aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2021-01-17 20:40:23 -0800
committerJason Mitchell <mitchej@gmail.com>2021-01-17 20:40:23 -0800
commitf3e87249e566a8c80a22d1a30dce632abba4033e (patch)
treeed808ebe174c6f68eb89b3060d714ae8d64c27b3 /src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
parentdb1a9e4a7fc67a1650ca08e5d6cfd1921d354b5d (diff)
downloadGT5-Unofficial-f3e87249e566a8c80a22d1a30dce632abba4033e.tar.gz
GT5-Unofficial-f3e87249e566a8c80a22d1a30dce632abba4033e.tar.bz2
GT5-Unofficial-f3e87249e566a8c80a22d1a30dce632abba4033e.zip
More removal of commented out code, small formatting adjustments
Diffstat (limited to 'src/main/java/gregtech/common/covers/GT_Cover_Shutter.java')
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Shutter.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
index b1c0c5c3af..360bcce6eb 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
@@ -13,8 +13,7 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_Shutter
- extends GT_CoverBehavior {
+public class GT_Cover_Shutter extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
return aCoverVariable;
}
@@ -32,35 +31,35 @@ public class GT_Cover_Shutter
}
public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0));
}
public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0));
}
public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0));
}
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {