Fix that the main facing of basic machines can be set to top/bottom (#1354)
This commit is contained in:
parent
d1c2477ea9
commit
38d150a90b
1 changed files with 8 additions and 3 deletions
|
@ -110,10 +110,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
|
||||||
mNEIName = aNEIName;
|
mNEIName = aNEIName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setMainFacing(byte aDirection){
|
protected boolean isValidMainFacing(byte aSide) {
|
||||||
mMainFacing = aDirection;
|
return aSide > 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean setMainFacing(byte aSide){
|
||||||
|
if (!isValidMainFacing(aSide)) return false;
|
||||||
|
mMainFacing = aSide;
|
||||||
if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){
|
if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){
|
||||||
getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aDirection));
|
getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aSide));
|
||||||
}
|
}
|
||||||
onFacingChange();
|
onFacingChange();
|
||||||
onMachineBlockUpdate();
|
onMachineBlockUpdate();
|
||||||
|
|
Loading…
Reference in a new issue