Skip to content

Commit b716a4e

Browse files
committed
fixes
1 parent 8f19273 commit b716a4e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/com/mrh0/createaddition/blocks/modular_accumulator/ModularAccumulatorBlockEntity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,13 @@ public int getMinValue() {
589589

590590
@Override
591591
public int getCurrentValue() {
592-
ModularAccumulatorBlockEntity controllerTE = getControllerBE();
593-
if (controllerTE == null) return 0;
594-
return Math.round(controllerTE.getFillState() * 100f);
592+
ModularAccumulatorBlockEntity controllerBE = getControllerBE();
593+
if (controllerBE == null) return 0;
594+
return (int)((float)controllerBE.energyStorage.getEnergyStored() / (float)controllerBE.energyStorage.getMaxEnergyStored() * 100f);
595595
}
596596

597597
@Override
598598
public MutableComponent format(int i) {
599-
return Component.literal(getCurrentValue() + "%");
599+
return Component.literal(i + "%");
600600
}
601601
}

src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ AlphaMode, BobDole, legoatoom, StockiesLad, THEREDSTONEBRO, and Uraxys.
5555
[[dependencies.createaddition]]
5656
modId="create"
5757
mandatory=true
58-
versionRange="[6.0.1,)"
58+
versionRange="[6.0.3,)"
5959
ordering="NONE"
6060
side="BOTH"
6161
[[dependencies.createaddition]]

0 commit comments

Comments
 (0)