Fix a crash when a machine "clicks" on a gate (#3542)
Fix a crash when a Thermal Expansion Autonomous Activator clicks on a BuildCraft gate
This commit is contained in:
parent
d5033da8a1
commit
04936780cd
|
@ -325,7 +325,10 @@ public final class Gate implements IGate, ISidedStatementContainer, IRedstoneSta
|
|||
public void openGui(EntityPlayer player) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
player.openGui(BuildCraftTransport.instance, GuiIds.GATES, pipe.container.getWorldObj(), pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord);
|
||||
((ContainerGateInterface) player.openContainer).setGate(direction.ordinal());
|
||||
// ThermalExpansion Autonomous Activator crash fix
|
||||
if (player.openContainer instanceof ContainerGateInterface) {
|
||||
((ContainerGateInterface) player.openContainer).setGate(direction.ordinal());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue