Fix compatibility of Title packet for 1.10 and lower (#1997)
This commit is contained in:
parent
f3e5f34aeb
commit
8574688be7
@ -31,7 +31,7 @@ public class Title extends DefinedPacket
|
|||||||
int index = readVarInt( buf );
|
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 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++;
|
||||||
}
|
}
|
||||||
@ -58,9 +58,9 @@ public class Title extends DefinedPacket
|
|||||||
int index = action.ordinal();
|
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 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 );
|
writeVarInt( index, buf );
|
||||||
|
Loading…
Reference in New Issue
Block a user