Spawn the player!!!!

This commit is contained in:
DankParrot 2020-08-03 18:40:15 -07:00
parent 483d1f2e39
commit 1ead4a1590
2 changed files with 44 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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
}
}
}
}
}