diff options
author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-10-02 07:31:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 05:31:08 +0000 |
commit | 3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3 (patch) | |
tree | 107d9d2442891990ef1cdef1d8bb2df6bb96952a /src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone | |
parent | bfc7b2b07f72d0903a70791ff96f9c837ddd5ff0 (diff) | |
download | GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.tar.gz GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.tar.bz2 GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.zip |
Cleanup the codebase (#3311)
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java | 11 |
1 files changed, 5 insertions, 6 deletions
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<Integer> tKeys = GregTechAPI.sCircuitryBehaviors.keySet(); - ArrayList<Integer> tList = new ArrayList<>(); - tList.addAll(tKeys); + ArrayList<Integer> 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<Integer> tKeys = GregTechAPI.sCircuitryBehaviors.keySet(); - ArrayList<Integer> tList = new ArrayList<>(); - tList.addAll(tKeys); + ArrayList<Integer> 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 |