Latest snapshot. Doesnt seem to be worky though

This commit is contained in:
md_5
2013-10-19 17:42:45 +11:00
parent 4f8085678c
commit 00854988fb
5 changed files with 12 additions and 6 deletions

View File

@@ -92,8 +92,8 @@ public enum Protocol
};
/*========================================================================*/
public static final int MAX_PACKET_ID = 0xFF;
public static final int PROTOCOL_VERSION = 0x00;
public static final String MINECRAFT_VERSION = "13w41b";
public static final int PROTOCOL_VERSION = 0x01;
public static final String MINECRAFT_VERSION = "13w42b";
/*========================================================================*/
public final ProtocolDirection TO_SERVER = new ProtocolDirection( "TO_SERVER" );
public final ProtocolDirection TO_CLIENT = new ProtocolDirection( "TO_CLIENT" );

View File

@@ -20,6 +20,7 @@ public class Login extends DefinedPacket
private int dimension;
private short difficulty;
private short maxPlayers;
private String levelType;
@Override
public void read(ByteBuf buf)
@@ -29,6 +30,7 @@ public class Login extends DefinedPacket
dimension = buf.readByte();
difficulty = buf.readUnsignedByte();
maxPlayers = buf.readUnsignedByte();
levelType = readString( buf );
}
@Override
@@ -39,6 +41,7 @@ public class Login extends DefinedPacket
buf.writeByte( dimension );
buf.writeByte( difficulty );
buf.writeByte( maxPlayers );
writeString( levelType, buf );
}
@Override

View File

@@ -18,6 +18,7 @@ public class Respawn extends DefinedPacket
private int dimension;
private short difficulty;
private short gameMode;
private String levelType;
@Override
public void read(ByteBuf buf)
@@ -25,6 +26,7 @@ public class Respawn extends DefinedPacket
dimension = buf.readInt();
difficulty = buf.readUnsignedByte();
gameMode = buf.readUnsignedByte();
levelType = readString( buf );
}
@Override
@@ -33,6 +35,7 @@ public class Respawn extends DefinedPacket
buf.writeInt( dimension );
buf.writeByte( difficulty );
buf.writeByte( gameMode );
writeString( levelType, buf );
}
@Override