aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bartworks/common/tileentities/multis/MTELESU.java
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-09-14 22:35:51 +0200
committerGitHub <noreply@github.com>2024-09-14 20:35:51 +0000
commit9c18caf7fc642a21efad6673e59db85f5b66ab88 (patch)
treedbd10650e51b45b94eb47734c76ca43ea6226e7a /src/main/java/bartworks/common/tileentities/multis/MTELESU.java
parent0d2de2fef9148b2284d700810aad18a6139f1130 (diff)
downloadGT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.tar.gz
GT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.tar.bz2
GT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.zip
Port BW config to GTNHLib (#3169)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/bartworks/common/tileentities/multis/MTELESU.java')
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTELESU.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTELESU.java b/src/main/java/bartworks/common/tileentities/multis/MTELESU.java
index a039aa593c..e2c393f889 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTELESU.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTELESU.java
@@ -43,7 +43,7 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget;
import bartworks.API.modularUI.BWUITextures;
import bartworks.MainMod;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bartworks.common.loaders.ItemRegistry;
import bartworks.util.BWTooltipReference;
import bartworks.util.ConnectedBlocksChecker;
@@ -85,7 +85,7 @@ public class MTELESU extends MTEMultiBlockBase {
public MTELESU(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
- this.mStorage = ConfigHandler.energyPerCell;
+ this.mStorage = Configuration.multiblocks.energyPerCell;
}
public MTELESU(String aName) {
@@ -136,7 +136,7 @@ public class MTELESU extends MTEMultiBlockBase {
@Override
public long maxEUOutput() {
- return Math.min(Math.max(this.mStorage / ConfigHandler.energyPerCell, 1L), 32768L);
+ return Math.min(Math.max(this.mStorage / Configuration.multiblocks.energyPerCell, 1L), 32768L);
}
@Override
@@ -177,7 +177,7 @@ public class MTELESU extends MTEMultiBlockBase {
Collections.addAll(e, dsc);
e.add(
StatCollector.translateToLocal("tooltip.tile.lesu.1.name") + " "
- + GTUtility.formatNumbers(ConfigHandler.energyPerCell)
+ + GTUtility.formatNumbers(Configuration.multiblocks.energyPerCell)
+ "EU");
dsc = StatCollector.translateToLocal("tooltip.tile.lesu.2.name")
.split(";");
@@ -396,9 +396,10 @@ public class MTELESU extends MTEMultiBlockBase {
}
this.mEfficiency = this.getMaxEfficiency(null);
- this.mStorage = ConfigHandler.energyPerCell * this.connectedcells.hashset.size() >= Long.MAX_VALUE - 1
- || ConfigHandler.energyPerCell * this.connectedcells.hashset.size() < 0 ? Long.MAX_VALUE - 1
- : ConfigHandler.energyPerCell * this.connectedcells.hashset.size();
+ this.mStorage = Configuration.multiblocks.energyPerCell * this.connectedcells.hashset.size()
+ >= Long.MAX_VALUE - 1 || Configuration.multiblocks.energyPerCell * this.connectedcells.hashset.size() < 0
+ ? Long.MAX_VALUE - 1
+ : Configuration.multiblocks.energyPerCell * this.connectedcells.hashset.size();
this.mMaxProgresstime = 1;
this.mProgresstime = 0;
@@ -546,7 +547,7 @@ public class MTELESU extends MTEMultiBlockBase {
() -> this.getBaseMetaTileEntity()
.isActive()
? this.getBaseMetaTileEntity()
- .getOutputVoltage() * ConfigHandler.energyPerCell
+ .getOutputVoltage() * Configuration.multiblocks.energyPerCell
: 0,
val -> clientMaxEU = val))
.widget(