From 13d679e7d72aace00501b4df88b15f80c4b9654f Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 13 Mar 2014 19:30:27 +0000 Subject: [PATCH] Correctly resize the spawn object packet --- proxy/src/main/java/net/md_5/bungee/EntityMap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 a73ffbac..9e4480e7 100644 --- a/proxy/src/main/java/net/md_5/bungee/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/EntityMap.java @@ -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 ); } } }