#2482: Fix error in reading slots
This commit is contained in:
parent
176b75b97e
commit
a710698277
@ -157,7 +157,7 @@ public abstract class EntityMap
|
||||
packet.skipBytes( 16 ); // float, float, float, flat
|
||||
break;
|
||||
case 27: // item
|
||||
readSkipSlot( packet );
|
||||
readSkipSlot( packet, protocolVersion );
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -192,7 +192,7 @@ public abstract class EntityMap
|
||||
DefinedPacket.readString( packet );
|
||||
break;
|
||||
case 5:
|
||||
readSkipSlot( packet );
|
||||
readSkipSlot( packet, protocolVersion );
|
||||
break;
|
||||
case 6:
|
||||
packet.skipBytes( 1 ); // boolean
|
||||
@ -238,11 +238,11 @@ public abstract class EntityMap
|
||||
packet.readerIndex( readerIndex );
|
||||
}
|
||||
|
||||
private static void readSkipSlot(ByteBuf packet)
|
||||
private static void readSkipSlot(ByteBuf packet, int protocolVersion)
|
||||
{
|
||||
if ( packet.readShort() != -1 )
|
||||
{
|
||||
packet.skipBytes( 3 ); // byte, short
|
||||
packet.skipBytes( ( protocolVersion >= ProtocolConstants.MINECRAFT_1_13 ) ? 1 : 3 ); // byte vs byte, short
|
||||
|
||||
int position = packet.readerIndex();
|
||||
if ( packet.readByte() != 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user