From 3525762175ae2e021ff9a19c60649a32f4b05b7d Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Sun, 17 Jan 2021 05:06:05 +0800 Subject: 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> --- .../machines/multi/GT_MetaTileEntity_Cleanroom.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech') 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 { -- cgit