Only open machine gui if front is free.
This commit is contained in:
parent
8e043d00d9
commit
ef22bf6ab9
1 changed files with 5 additions and 1 deletions
|
@ -346,7 +346,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
|
||||||
@Override
|
@Override
|
||||||
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
|
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
|
||||||
if (aBaseMetaTileEntity.isClientSide()) return true;
|
if (aBaseMetaTileEntity.isClientSide()) return true;
|
||||||
aBaseMetaTileEntity.openGUI(aPlayer);
|
if(aBaseMetaTileEntity.getAirAtSide((byte) mMainFacing)){
|
||||||
|
aBaseMetaTileEntity.openGUI(aPlayer);
|
||||||
|
}else{
|
||||||
|
GT_Utility.sendChatToPlayer(aPlayer,"Front blocked!");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue