@Override
public RotationMessage decode(ChannelBuffer buffer) throws IOException {
float rotation = buffer.readFloat();
float pitch = buffer.readFloat();
boolean onGround = buffer.readByte() == 1;
return new RotationMessage(rotation, pitch, onGround);
}