diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2021-01-17 05:06:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-16 22:06:05 +0100 |
commit | 3525762175ae2e021ff9a19c60649a32f4b05b7d (patch) | |
tree | 7cb73fb9c98f9e7cb862726a76a2979080b584e6 /src/main/java/gregtech | |
parent | daad5b334e977fe0611a2ff012395a3d8ac4ab60 (diff) | |
download | GT5-Unofficial-3525762175ae2e021ff9a19c60649a32f4b05b7d.tar.gz GT5-Unofficial-3525762175ae2e021ff9a19c60649a32f4b05b7d.tar.bz2 GT5-Unofficial-3525762175ae2e021ff9a19c60649a32f4b05b7d.zip |
cleanroom related fix (#405)
* Fix cleanroom
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
* Fix cleanroom tooltip not mentioning diodes count limit
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 0ca2cb8a6c..5706a225e6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -60,6 +60,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)") .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls") .addStructureInfo("You can also use Diodes for more power") + .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit") .toolTipFinisher("Gregtech"); if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { return tt.getInformation(); @@ -188,10 +189,12 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas if ((!this.addMaintenanceToMachineList(tTileEntity, 82)) && (!this.addEnergyInputToMachineList(tTileEntity, 82))) { if (tBlock instanceof ic2.core.block.BlockIC2Door) { if ((tMeta & 8) == 0) { - if (Math.abs(dY) < y) //x - side - doorState = (tMeta & 0x5) == 0x4 || (tMeta & 0x5) == 0x1; - else if (Math.abs(dX) < x) //y-side, corners ignored. - doorState = (tMeta & 0x5) == 0x5 || (tMeta & 0x5) == 0x0; + // let's not fiddle with bits anymore. + if (Math.abs(dZ) < z) // on side parallel to z axis + doorState = tMeta == 1 || tMeta == 3 || tMeta == 4 || tMeta == 6; + else if (Math.abs(dX) < x) // on side parallel to x axis + doorState = tMeta == 0 || tMeta == 2 || tMeta == 5 || tMeta == 7; + // corners ignored } mDoorCount++; } else { |