Move 0x13 to clientbound only

This commit is contained in:
Thinkofdeath 2013-12-08 16:46:40 +00:00
parent 230cca0f9e
commit 17fc120e07

View File

@ -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 );
}