aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2023-01-24 11:50:23 +0100
committerGitHub <noreply@github.com>2023-01-24 11:50:23 +0100
commit1e6f0bf1147ddbb5fe0817a7c751f2635f3ee18b (patch)
tree28c35526e86c059786cdd5264bbfb509fa0c47b8
parent9318268756df4c2443b98bd8f3b545371713be6f (diff)
parentb634e76e390c52df9945b722a1a33b735f6ffa6c (diff)
downloadGT5-Unofficial-1e6f0bf1147ddbb5fe0817a7c751f2635f3ee18b.tar.gz
GT5-Unofficial-1e6f0bf1147ddbb5fe0817a7c751f2635f3ee18b.tar.bz2
GT5-Unofficial-1e6f0bf1147ddbb5fe0817a7c751f2635f3ee18b.zip
Merge pull request #54 from GTNewHorizons/fix/lsc
fix LSC not always using -2 as unset value
-rw-r--r--src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
index a0ab670136..a020502bad 100644
--- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
+++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
@@ -114,6 +114,7 @@ public class GTMTE_LapotronicSuperCapacitor
private static final String STRUCTURE_PIECE_LAYER = "slice";
private static final String STRUCTURE_PIECE_TOP = "top";
private static final String STRUCTURE_PIECE_MID = "mid";
+ private static final int GLASS_TIER_UNSET = -2;
private static final Block LSC_PART = Blocks.lscLapotronicEnergyUnit;
private static final Item LSC_PART_ITEM = Item.getItemFromBlock(LSC_PART);
@@ -169,7 +170,7 @@ public class GTMTE_LapotronicSuperCapacitor
withChannel(
"glass",
BorosilicateGlass.ofBoroGlass(
- (byte) -1, (te, t) -> te.glassTier = t, te -> te.glassTier)))
+ (byte) GLASS_TIER_UNSET, (te, t) -> te.glassTier = t, te -> te.glassTier)))
.addElement(
'c',
ofChain(
@@ -180,7 +181,7 @@ public class GTMTE_LapotronicSuperCapacitor
withChannel(
"glass",
BorosilicateGlass.ofBoroGlass(
- (byte) -2,
+ (byte) GLASS_TIER_UNSET,
(te, t) -> te.glassTier = t,
te -> te.glassTier)))),
onlyIf(
@@ -518,7 +519,7 @@ public class GTMTE_LapotronicSuperCapacitor
mMaxEUIn = 0;
mMaxEUOut = 0;
- glassTier = -2;
+ glassTier = GLASS_TIER_UNSET;
casingAmount = 0;
if (!checkPiece(STRUCTURE_PIECE_BASE, 2, 1, 0)) return false;