1.7.6-pre1 Support
This commit is contained in:
@@ -97,7 +97,7 @@ public enum Protocol
|
||||
};
|
||||
/*========================================================================*/
|
||||
public static final int MAX_PACKET_ID = 0xFF;
|
||||
public static List<Integer> supportedVersions = Arrays.asList( 4, 8 );
|
||||
public static List<Integer> supportedVersions = Arrays.asList( 4, 5, 8 );
|
||||
/*========================================================================*/
|
||||
public final ProtocolDirection TO_SERVER = new ProtocolDirection( "TO_SERVER" );
|
||||
public final ProtocolDirection TO_CLIENT = new ProtocolDirection( "TO_CLIENT" );
|
||||
|
@@ -28,7 +28,7 @@ public class Chat extends DefinedPacket
|
||||
public void read(ByteBuf buf, Protocol.ProtocolDirection direction, int protocolVersion)
|
||||
{
|
||||
message = readString( buf );
|
||||
if ( direction.toString().equals( "TO_CLIENT" ) && protocolVersion >= 5 )
|
||||
if ( direction.toString().equals( "TO_CLIENT" ) && protocolVersion >= 7 )
|
||||
{
|
||||
position = buf.readByte();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class Chat extends DefinedPacket
|
||||
public void write(ByteBuf buf, Protocol.ProtocolDirection direction, int protocolVersion)
|
||||
{
|
||||
writeString( message, buf );
|
||||
if ( direction.toString().equals( "TO_CLIENT" ) && protocolVersion >= 5 )
|
||||
if ( direction.toString().equals( "TO_CLIENT" ) && protocolVersion >= 7 )
|
||||
{
|
||||
buf.writeByte( position );
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ public class ClientSettings extends DefinedPacket
|
||||
viewDistance = buf.readByte();
|
||||
chatFlags = buf.readByte();
|
||||
unknown = buf.readBoolean();
|
||||
if ( protocolVersion < 5 )
|
||||
if ( protocolVersion < 6 )
|
||||
{
|
||||
difficulty = buf.readByte();
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public class ClientSettings extends DefinedPacket
|
||||
buf.writeByte( viewDistance );
|
||||
buf.writeByte( chatFlags );
|
||||
buf.writeBoolean( unknown );
|
||||
if ( protocolVersion < 5 )
|
||||
if ( protocolVersion < 6 )
|
||||
{
|
||||
buf.writeByte( difficulty );
|
||||
}
|
||||
|
Reference in New Issue
Block a user