diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java index 049aa2e8..faa94c87 100644 --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java @@ -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 )