From 12746f2a2cfbf5a697606ffd43fccb3acd7579f3 Mon Sep 17 00:00:00 2001 From: SirSengir Date: Sat, 17 Nov 2012 09:13:08 +0100 Subject: [PATCH] Fixed more instances where inventoryContainer was used instead of openContainer. --- .../network/PacketHandlerTransport.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index 2c2d2fe3..1a39e477 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -107,7 +107,7 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateActions(EntityPlayer player, PacketUpdate packet) { - Container container = player.inventoryContainer; + Container container = player.openContainer; if (!(container instanceof ContainerGateInterface)) return; @@ -121,7 +121,7 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateTriggers(EntityPlayer player, PacketUpdate packet) { - Container container = player.inventoryContainer; + Container container = player.openContainer; if (!(container instanceof ContainerGateInterface)) return; @@ -135,7 +135,7 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateSelection(EntityPlayer player, PacketUpdate packet) { - Container container = player.inventoryContainer; + Container container = player.openContainer; if (!(container instanceof ContainerGateInterface)) return; @@ -248,10 +248,10 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateSelectionChange(EntityPlayer playerEntity, PacketUpdate packet) { - if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) + if (!(playerEntity.openContainer instanceof ContainerGateInterface)) return; - ((ContainerGateInterface) playerEntity.inventoryContainer).handleSelectionChange(packet); + ((ContainerGateInterface) playerEntity.openContainer).handleSelectionChange(packet); } /** @@ -261,10 +261,10 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateSelectionRequest(EntityPlayer playerEntity, PacketCoordinates packet) { - if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) + if (!(playerEntity.openContainer instanceof ContainerGateInterface)) return; - ((ContainerGateInterface) playerEntity.inventoryContainer).sendSelection(playerEntity); + ((ContainerGateInterface) playerEntity.openContainer).sendSelection(playerEntity); } /** @@ -274,10 +274,10 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateInitRequest(EntityPlayer playerEntity, PacketCoordinates packet) { - if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) + if (!(playerEntity.openContainer instanceof ContainerGateInterface)) return; - ((ContainerGateInterface) playerEntity.inventoryContainer).handleInitRequest(playerEntity); + ((ContainerGateInterface) playerEntity.openContainer).handleInitRequest(playerEntity); } /**