Beispiel #1
0
 @Override
 public void decode(Buffer buffer, AttachEntityPacket packet) {
   packet.setEntityID(buffer.readInt());
   packet.setVehicleID(buffer.readInt());
   packet.setLeash(buffer.readBoolean());
 }
Beispiel #2
0
 @Override
 public void encode(Buffer buffer, AttachEntityPacket packet) {
   buffer.writeInt(packet.getEntityID());
   buffer.writeVarInt(packet.getVehicleID());
   buffer.writeBoolean(packet.isLeash());
 }