At last one free face.

This commit is contained in:
Blood-Asp 2017-06-12 13:48:54 +02:00
parent ef22bf6ab9
commit e85a761e82

View file

@ -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;
}