From e85a761e82b2aa1d3d49c19e03c5c32fb72ec40b Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Mon, 12 Jun 2017 13:48:54 +0200 Subject: [PATCH] At last one free face. --- .../GT_MetaTileEntity_BasicMachine.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index ebe16f04..315c9032 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -346,11 +346,13 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - if(aBaseMetaTileEntity.getAirAtSide((byte) mMainFacing)){ - aBaseMetaTileEntity.openGUI(aPlayer); - }else{ - GT_Utility.sendChatToPlayer(aPlayer,"Front blocked!"); + for(byte i=0;i < 6; i++){ + if(aBaseMetaTileEntity.getAirAtSide(i)){ + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } } + GT_Utility.sendChatToPlayer(aPlayer,"No free Side!"); return true; }