Spawn the player!!!!
This commit is contained in:
parent
483d1f2e39
commit
1ead4a1590
|
@ -102,7 +102,7 @@ namespace Feather
|
|||
}
|
||||
|
||||
template <>
|
||||
void DedicatedServer::HandlePacket(MinecraftClient& client, const Login::ServerboundStart& start)
|
||||
void DedicatedServer::HandlePacket(MinecraftClient& client,const Login::ServerboundStart& start)
|
||||
{
|
||||
//Login::ClientboundSuccess success =
|
||||
//{
|
||||
|
@ -134,5 +134,25 @@ namespace Feather
|
|||
};
|
||||
|
||||
client.SendMessage(join);
|
||||
|
||||
Play::ClientboundSpawnPosition spawnPos =
|
||||
{
|
||||
.location = BlockPos(0, 64, 0),
|
||||
};
|
||||
|
||||
client.SendMessage(spawnPos);
|
||||
|
||||
Play::ClientboundPlayerPositionAndLook playerPos =
|
||||
{
|
||||
.x = 0,
|
||||
.y = 64,
|
||||
.z = 0,
|
||||
.xRot = 0,
|
||||
.yRot = 0,
|
||||
.flags = 0,
|
||||
.id = 0,
|
||||
};
|
||||
|
||||
client.SendMessage(playerPos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,6 +155,29 @@
|
|||
enableRespawnScreen : bool
|
||||
}
|
||||
}
|
||||
|
||||
PlayerPositionAndLook:
|
||||
{
|
||||
id: 0x36
|
||||
vars: {
|
||||
x: double
|
||||
y: double
|
||||
z: double
|
||||
// xRot is yaw, yRot is pitch
|
||||
xRot: float
|
||||
yRot: float
|
||||
flags: byte
|
||||
id: varint
|
||||
}
|
||||
}
|
||||
|
||||
SpawnPosition:
|
||||
{
|
||||
id: 0x4E
|
||||
vars: {
|
||||
location: position
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue