Correctly resize the spawn object packet
This commit is contained in:
parent
72cadac76e
commit
13d679e7d7
@ -128,11 +128,11 @@ public class EntityMap
|
|||||||
if ( newId == 0 && readId != 0 )
|
if ( newId == 0 && readId != 0 )
|
||||||
{ // Trim off the extra data
|
{ // Trim off the extra data
|
||||||
packet.readerIndex( readerIndex );
|
packet.readerIndex( readerIndex );
|
||||||
packet.capacity( packet.capacity() - 6 );
|
packet.writerIndex( packet.readableBytes() - 6 );
|
||||||
} else if ( newId != 0 && readId == 0 )
|
} else if ( newId != 0 && readId == 0 )
|
||||||
{ // Add on the extra data
|
{ // Add on the extra data
|
||||||
packet.readerIndex( readerIndex );
|
packet.readerIndex( readerIndex );
|
||||||
packet.capacity( packet.capacity() + 6 );
|
packet.writerIndex( packet.readableBytes() + 6 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user