// Path: src/main/java/com/supermarcus/jraklib/protocol/Packet.java
// abstract public class Packet implements BinaryConvertible {
//     public static final int MAX_SIZE = 1024 * 1024 * 8;
// 
//     private ByteBuffer buffer = ByteBuffer.allocate(Packet.MAX_SIZE);
// 
//     private BinaryUtils utils = new BinaryUtils(this.buffer);
// 
//     private PacketInfo identifier = null;
// 
//     public Packet(PacketInfo identifier){
//         this.identifier = identifier;
//         this.getBuffer().put(this.getNetworkID());
//     }
// 
//     abstract public void encode();
// 
//     abstract public void decode();
// 
//     public byte getNetworkID(){
//         return this.getPacketIdentifier().getNetworkId();
//     }
// 
//     public PacketInfo getPacketIdentifier(){
//         return this.identifier;
//     }
// 
//     protected ByteBuffer getBuffer(){
//         return buffer;
//     }
// 
//     public void initBuffer(ByteBuffer buffer){
//         this.buffer = buffer;
//         this.utils = new BinaryUtils(buffer);
//         if(PacketInfo.getById(buffer.get()) != this.getPacketIdentifier()){
//             throw new IllegalArgumentException();
//         }
//     }
// 
//     public byte[] toBinary(){
//         int length = getBuffer().position();
//         byte[] raw = new byte[length];
//         System.arraycopy(getBuffer().array(), 0, raw, 0, length);
//         return raw;
//     }
// 
//     public BinaryUtils getUtils() {
//         return utils;
//     }
// }


import com.supermarcus.jraklib.protocol.Packet;
package com.supermarcus.jraklib.protocol.raklib;


public class OPEN_CONNECTION_REPLY_1 extends Packet {
    private long serverID = 0L;

    private int mtuSize = 0;

    private boolean security = false;

    public OPEN_CONNECTION_REPLY_1() {
        super(PacketInfo.OPEN_CONNECTION_REPLY_1);
    }

    @Override
    public void encode() {
        this.getUtils().putMagic();
        this.getBuffer().putLong(this.getServerID());
        this.getUtils().putBool(this.isSecurity());
        this.getBuffer().putShort((short) this.getMtuSize());
    }

    @Override
    public void decode() {
        this.getUtils().getMagic();
        this.setServerID(this.getBuffer().getLong());
        this.setSecurity(this.getUtils().getBool());
        this.setMtuSize(this.getBuffer().getShort());
    }

    public long getServerID() {
        return serverID;
    }

    public void setServerID(long serverID) {
// Path: src/main/java/com/supermarcus/jraklib/protocol/Packet.java
// abstract public class Packet implements BinaryConvertible {
//     public static final int MAX_SIZE = 1024 * 1024 * 8;
// 
//     private ByteBuffer buffer = ByteBuffer.allocate(Packet.MAX_SIZE);
// 
//     private BinaryUtils utils = new BinaryUtils(this.buffer);
// 
//     private PacketInfo identifier = null;
// 
//     public Packet(PacketInfo identifier){
//         this.identifier = identifier;
//         this.getBuffer().put(this.getNetworkID());
//     }
// 
//     abstract public void encode();
// 
//     abstract public void decode();
// 
//     public byte getNetworkID(){
//         return this.getPacketIdentifier().getNetworkId();
//     }
// 
//     public PacketInfo getPacketIdentifier(){
//         return this.identifier;
//     }
// 
//     protected ByteBuffer getBuffer(){
//         return buffer;
//     }
// 
//     public void initBuffer(ByteBuffer buffer){
//         this.buffer = buffer;
//         this.utils = new BinaryUtils(buffer);
//         if(PacketInfo.getById(buffer.get()) != this.getPacketIdentifier()){
//             throw new IllegalArgumentException();
//         }
//     }
// 
//     public byte[] toBinary(){
//         int length = getBuffer().position();
//         byte[] raw = new byte[length];
//         System.arraycopy(getBuffer().array(), 0, raw, 0, length);
//         return raw;
//     }
// 
//     public BinaryUtils getUtils() {
//         return utils;
//     }
// }


// Path: src/main/java/com/supermarcus/jraklib/protocol/raklib/OPEN_CONNECTION_REPLY_1.java
import com.supermarcus.jraklib.protocol.Packet;

package com.supermarcus.jraklib.protocol.raklib;


public class OPEN_CONNECTION_REPLY_1 extends Packet {
    private long serverID = 0L;

    private int mtuSize = 0;

    private boolean security = false;

    public OPEN_CONNECTION_REPLY_1() {
        super(PacketInfo.OPEN_CONNECTION_REPLY_1);
    }

    @Override
    public void encode() {
        this.getUtils().putMagic();
        this.getBuffer().putLong(this.getServerID());
        this.getUtils().putBool(this.isSecurity());
        this.getBuffer().putShort((short) this.getMtuSize());
    }

    @Override
    public void decode() {
        this.getUtils().getMagic();
        this.setServerID(this.getBuffer().getLong());
        this.setSecurity(this.getUtils().getBool());
        this.setMtuSize(this.getBuffer().getShort());
    }

    public long getServerID() {
        return serverID;
    }

    public void setServerID(long serverID) {
        this.serverID = serverID;