From 17fc120e070af342ebd2a68362c9ed45145226de Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sun, 8 Dec 2013 16:46:40 +0000 Subject: [PATCH] Move 0x13 to clientbound only --- .../main/java/net/md_5/bungee/EntityMap.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) 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 f81f51fe..e8bf94dc 100644 --- a/proxy/src/main/java/net/md_5/bungee/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/EntityMap.java @@ -72,6 +72,21 @@ public class EntityMap packet.setInt( packetIdLength + 4, serverEntityId ); } } + if ( packetId == 0x13 ) + { + int count = packet.getByte( packetIdLength ); + for ( int i = 0; i < count; i++ ) + { + int readId = packet.getInt( packetIdLength + 1 + i * 4); + if ( readId == serverEntityId ) + { + packet.setInt( packetIdLength + 1 + i * 4, clientEntityId ); + } else if ( readId == clientEntityId ) + { + packet.setInt( packetIdLength + 1 + i * 4, serverEntityId ); + } + } + } packet.readerIndex( readerIndex ); } @@ -105,20 +120,6 @@ public class EntityMap packet.writeBytes( data ); data.release(); } - } else if ( packetId == 0x13 ) - { - int count = packet.getByte( packetIdLength ); - for ( int i = 0; i < count; i++ ) - { - int readId = packet.getInt( packetIdLength + 1 + i * 4); - if ( readId == serverEntityId ) - { - packet.setInt( packetIdLength + 1 + i * 4, clientEntityId ); - } else if ( readId == clientEntityId ) - { - packet.setInt( packetIdLength + 1 + i * 4, serverEntityId ); - } - } } packet.readerIndex( readerIndex ); }