package packets.c2spackets;
import network.MCConnection;
import entities.Player;
import exceptions.UnrecoverableException;
import packets.PacketHandler;
import world.WorldState;
public class P0x0C extends PacketHandler{
public P0x0C(WorldState state) {
super(state);
}
@Override
public void handle(MCConnection conn) throws UnrecoverableException {
Player p = conn.getPlayer();
float yaw = conn.r.readFloat(); //Absolute rotation on the X axis in degrees
float pitch = conn.r.readFloat(); //Absolute rotation on the Y axis in degrees
boolean onground = conn.r.readBoolean();
p.setYaw(yaw);
p.setPitch(pitch);
p.setOnGround(onground);
p.updateLocation(); //TODO: updateLook
}
}