@Override public byte[] constructResponseInBytes() { // TODO Auto-generated method stub GamePacket packet = new GamePacket(responseCode); packet.addString(player.getUsername()); packet.addFloat(player.getPosition().getX()); packet.addFloat(player.getPosition().getY()); packet.addFloat(player.getPosition().getZ()); packet.addFloat(player.getPosition().getH()); packet.addFloat(player.getPosition().getP()); packet.addFloat(player.getPosition().getR()); packet.addInt32(this.forward); packet.addInt32(this.backward); packet.addInt32(this.right); packet.addInt32(this.left); return packet.getBytes(); }
@Override public byte[] constructResponseInBytes() { GamePacket packet = new GamePacket(responseCode); packet.addShort16(type); packet.addInt32(amount); packet.addInt32(target); return packet.getBytes(); }