Correctly resize the spawn object packet

This commit is contained in:
Thinkofdeath 2014-03-13 19:30:27 +00:00
parent 72cadac76e
commit 13d679e7d7

View File

@ -128,11 +128,11 @@ public class EntityMap
if ( newId == 0 && readId != 0 )
{ // Trim off the extra data
packet.readerIndex( readerIndex );
packet.capacity( packet.capacity() - 6 );
packet.writerIndex( packet.readableBytes() - 6 );
} else if ( newId != 0 && readId == 0 )
{ // Add on the extra data
packet.readerIndex( readerIndex );
packet.capacity( packet.capacity() + 6 );
packet.writerIndex( packet.readableBytes() + 6 );
}
}
}