Fixed more instances where inventoryContainer was used instead of openContainer.

This commit is contained in:
SirSengir 2012-11-17 09:13:08 +01:00
parent d79959f11e
commit 12746f2a2c

View file

@ -107,7 +107,7 @@ public class PacketHandlerTransport implements IPacketHandler {
* @param packet * @param packet
*/ */
private void onGateActions(EntityPlayer player, PacketUpdate packet) { private void onGateActions(EntityPlayer player, PacketUpdate packet) {
Container container = player.inventoryContainer; Container container = player.openContainer;
if (!(container instanceof ContainerGateInterface)) if (!(container instanceof ContainerGateInterface))
return; return;
@ -121,7 +121,7 @@ public class PacketHandlerTransport implements IPacketHandler {
* @param packet * @param packet
*/ */
private void onGateTriggers(EntityPlayer player, PacketUpdate packet) { private void onGateTriggers(EntityPlayer player, PacketUpdate packet) {
Container container = player.inventoryContainer; Container container = player.openContainer;
if (!(container instanceof ContainerGateInterface)) if (!(container instanceof ContainerGateInterface))
return; return;
@ -135,7 +135,7 @@ public class PacketHandlerTransport implements IPacketHandler {
* @param packet * @param packet
*/ */
private void onGateSelection(EntityPlayer player, PacketUpdate packet) { private void onGateSelection(EntityPlayer player, PacketUpdate packet) {
Container container = player.inventoryContainer; Container container = player.openContainer;
if (!(container instanceof ContainerGateInterface)) if (!(container instanceof ContainerGateInterface))
return; return;
@ -248,10 +248,10 @@ public class PacketHandlerTransport implements IPacketHandler {
* @param packet * @param packet
*/ */
private void onGateSelectionChange(EntityPlayer playerEntity, PacketUpdate packet) { private void onGateSelectionChange(EntityPlayer playerEntity, PacketUpdate packet) {
if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) if (!(playerEntity.openContainer instanceof ContainerGateInterface))
return; return;
((ContainerGateInterface) playerEntity.inventoryContainer).handleSelectionChange(packet); ((ContainerGateInterface) playerEntity.openContainer).handleSelectionChange(packet);
} }
/** /**
@ -261,10 +261,10 @@ public class PacketHandlerTransport implements IPacketHandler {
* @param packet * @param packet
*/ */
private void onGateSelectionRequest(EntityPlayer playerEntity, PacketCoordinates packet) { private void onGateSelectionRequest(EntityPlayer playerEntity, PacketCoordinates packet) {
if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) if (!(playerEntity.openContainer instanceof ContainerGateInterface))
return; return;
((ContainerGateInterface) playerEntity.inventoryContainer).sendSelection(playerEntity); ((ContainerGateInterface) playerEntity.openContainer).sendSelection(playerEntity);
} }
/** /**
@ -274,10 +274,10 @@ public class PacketHandlerTransport implements IPacketHandler {
* @param packet * @param packet
*/ */
private void onGateInitRequest(EntityPlayer playerEntity, PacketCoordinates packet) { private void onGateInitRequest(EntityPlayer playerEntity, PacketCoordinates packet) {
if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) if (!(playerEntity.openContainer instanceof ContainerGateInterface))
return; return;
((ContainerGateInterface) playerEntity.inventoryContainer).handleInitRequest(playerEntity); ((ContainerGateInterface) playerEntity.openContainer).handleInitRequest(playerEntity);
} }
/** /**