diff --git a/proxy/src/main/java/net/md_5/bungee/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/EntityMap.java index 260874e26..1cb7f996f 100644 --- a/proxy/src/main/java/net/md_5/bungee/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/EntityMap.java @@ -152,7 +152,8 @@ public class EntityMap int type = packet[5] & 0xFF; if ( type == 60 || type == 90 ) { - if ( readInt( packet, 20 ) == oldId ) + int index20 = readInt( packet, 20 ); + if ( packet.length > 24 && index20 == oldId ) { setInt( packet, 20, newId ); }