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); infoPkt.setPing(4);
channel.write(infoPkt); channel.write(infoPkt);
PositionAndLookPacket pkt = new PositionAndLookPacket(); // send Position and look
pkt.setLocation(new Location(0, 0, 0)); PositionAndLookPacket posLookPkt = new PositionAndLookPacket();
pkt.setStance(0); posLookPkt.setLocation(spawnLoc);
pkt.setYaw(0f); posLookPkt.setStance(spawnLoc.getY() + 1.64d);
pkt.setPitch(0f); posLookPkt.setYaw(0f);
pkt.setOnGround(false); posLookPkt.setPitch(0f);
channel.write(pkt); posLookPkt.setOnGround(false);
channel.write(posLookPkt);
playerManager.addPlayer(player); playerManager.addPlayer(player);
channel.flush(); channel.flush();