diff --git a/fml/patches/minecraft/net/minecraft/network/MemoryConnection.java.patch b/fml/patches/minecraft/net/minecraft/network/MemoryConnection.java.patch index cd4d776b6..2d2e043af 100644 --- a/fml/patches/minecraft/net/minecraft/network/MemoryConnection.java.patch +++ b/fml/patches/minecraft/net/minecraft/network/MemoryConnection.java.patch @@ -7,7 +7,37 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.net.InetSocketAddress; -@@ -77,6 +78,7 @@ +@@ -7,6 +8,11 @@ + import java.util.ArrayList; + import java.util.Collections; + import java.util.List; ++import java.util.Queue; ++import java.util.concurrent.ConcurrentLinkedQueue; ++ ++import com.google.common.collect.Queues; ++ + import net.minecraft.logging.ILogAgent; + import net.minecraft.network.packet.NetHandler; + import net.minecraft.network.packet.Packet; +@@ -14,7 +20,7 @@ + public class MemoryConnection implements INetworkManager + { + private static final SocketAddress field_74444_a = new InetSocketAddress("127.0.0.1", 0); +- private final List field_74442_b = Collections.synchronizedList(new ArrayList()); ++ private final Queue field_74442_b = Queues.newConcurrentLinkedQueue(); + private final ILogAgent field_98214_c; + private MemoryConnection field_74443_c; + private NetHandler field_74440_d; +@@ -65,7 +71,7 @@ + + while (i-- >= 0 && !this.field_74442_b.isEmpty()) + { +- Packet packet = (Packet)this.field_74442_b.remove(0); ++ Packet packet = field_74442_b.poll(); + packet.func_73279_a(this.field_74440_d); + } + +@@ -77,6 +83,7 @@ if (this.field_74441_e && this.field_74442_b.isEmpty()) { this.field_74440_d.func_72515_a(this.field_74438_f, this.field_74439_g);