package packets.c2spackets;
import network.MCConnection;
import entities.Player;
import exceptions.UnrecoverableException;
import packets.PacketHandler;
import world.WorldState;
public class P0x0D extends PacketHandler {
public P0x0D(WorldState state) {
super(state);
}
@Override
public void handle(MCConnection conn) throws UnrecoverableException {
double x = conn.r.readDouble();
double y = conn.r.readDouble();
double stance = conn.r.readDouble();
double z = conn.r.readDouble();
float yaw = conn.r.readFloat();
float pitch = conn.r.readFloat();
boolean onground = conn.r.readBoolean();
Player p = conn.getPlayer();
p.setLocation(x, y, z);
p.setStance(stance);
p.setYaw(yaw);
p.setPitch(pitch);
p.setOnGround(onground);
p.updateLocation();
}
}