Archived
0

send Position and look

This commit is contained in:
2018-04-19 08:34:38 +03:00
parent 90c194b2a4
commit f3ce19103a

View File

@@ -95,13 +95,14 @@ public class PacketHandler extends SimpleChannelInboundHandler<CSPacket> {
infoPkt.setPing(4);
channel.write(infoPkt);
PositionAndLookPacket pkt = new PositionAndLookPacket();
pkt.setLocation(new Location(0, 0, 0));
pkt.setStance(0);
pkt.setYaw(0f);
pkt.setPitch(0f);
pkt.setOnGround(false);
channel.write(pkt);
// send Position and look
PositionAndLookPacket posLookPkt = new PositionAndLookPacket();
posLookPkt.setLocation(spawnLoc);
posLookPkt.setStance(spawnLoc.getY() + 1.64d);
posLookPkt.setYaw(0f);
posLookPkt.setPitch(0f);
posLookPkt.setOnGround(false);
channel.write(posLookPkt);
playerManager.addPlayer(player);
channel.flush();