Fixed Bug with Terminal Scroll Bar and Searching.

Switched to Reactive Packet size protection.
This commit is contained in:
AlgorithmX2
2014-02-06 10:57:01 -06:00
parent 3343329ff9
commit c3549e483c
3 changed files with 20 additions and 6 deletions
@@ -1,6 +1,7 @@
package appeng.container.implementations;
import java.io.IOException;
import java.nio.BufferOverflowException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -136,14 +137,18 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IMEMonito
for (IAEItemStack send : monitorCache)
{
if ( piu.getLength() > 20000 )
try
{
piu.appendItem( send );
}
catch (BufferOverflowException boe)
{
Packet p = piu.getPacket();
PacketDispatcher.sendPacketToPlayer( p, (Player) c );
piu = new PacketMEInventoryUpdate();
}
piu.appendItem( send );
piu = new PacketMEInventoryUpdate();
piu.appendItem( send );
}
}
Packet p = piu.getPacket();