Fix compatibility of Title packet for 1.10 and lower (#1997)

This commit is contained in:
Nathan Poirier 2016-11-15 23:22:09 +01:00 committed by md-5
parent f3e5f34aeb
commit 8574688be7

View File

@ -31,7 +31,7 @@ public class Title extends DefinedPacket
int index = readVarInt( buf );
// If we're working on 1.10 or lower, increment the value of the index so we pull out the correct value.
if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index <= 2 )
if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index >= 2 )
{
index++;
}
@ -58,9 +58,9 @@ public class Title extends DefinedPacket
int index = action.ordinal();
// If we're working on 1.10 or lower, increment the value of the index so we pull out the correct value.
if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index <= 2 )
if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index >= 2 )
{
index++;
index--;
}
writeVarInt( index, buf );