From 3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3 Mon Sep 17 00:00:00 2001 From: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Date: Wed, 2 Oct 2024 07:31:08 +0200 Subject: Cleanup the codebase (#3311) Co-authored-by: boubou19 --- .../common/tileentities/redstone/MTERedstoneCircuitBlock.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java index 20cd569e24..fceebe62d3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java @@ -46,7 +46,8 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class MTERedstoneCircuitBlock extends MTERedstoneBase implements IRedstoneCircuitBlock, IAddUIWidgets { - public int mGate = 0, mGateData[] = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + public int mGate = 0; + public int[] mGateData = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; public boolean bOutput = true; public MTERedstoneCircuitBlock(int aID) { @@ -159,8 +160,7 @@ public class MTERedstoneCircuitBlock extends MTERedstoneBase implements IRedston public void switchGateForward(boolean aShift) { try { Set tKeys = GregTechAPI.sCircuitryBehaviors.keySet(); - ArrayList tList = new ArrayList<>(); - tList.addAll(tKeys); + ArrayList tList = new ArrayList<>(tKeys); if (tList.size() <= 0) return; Collections.sort(tList); if (!GregTechAPI.sCircuitryBehaviors.containsKey(mGate)) mGate = tList.get(0); @@ -177,8 +177,7 @@ public class MTERedstoneCircuitBlock extends MTERedstoneBase implements IRedston public void switchGateBackward(boolean aShift) { try { Set tKeys = GregTechAPI.sCircuitryBehaviors.keySet(); - ArrayList tList = new ArrayList<>(); - tList.addAll(tKeys); + ArrayList tList = new ArrayList<>(tKeys); if (tList.size() <= 0) return; Collections.sort(tList); if (!GregTechAPI.sCircuitryBehaviors.containsKey(mGate)) mGate = tList.get(0); @@ -324,7 +323,7 @@ public class MTERedstoneCircuitBlock extends MTERedstoneBase implements IRedston if (sCoversItems.isEmpty()) { initCovers(); } - return sCoversItems.get(Integer.valueOf(aStack)); + return sCoversItems.get(aStack); } @Override -- cgit