Skip to content

Commit c185e04

Browse files
committed
Fix the problem that the flux plug point eats up all the energy.
1 parent 03e6158 commit c185e04

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'net.minecraftforge.gradle' version '5.+'
33
}
44

5-
version = "1.12.2-1.11.1-r26-dev"
5+
version = "1.12.2-1.11.1-r27-dev"
66
group = "hellfirepvp.modularmachinery"
77

88
repositories {

src/main/java/hellfirepvp/modularmachinery/common/integration/fluxnetworks/MMEnergyHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public long addEnergy(long amount, @Nonnull TileEntity tile, EnumFacing side, bo
5151
TileEnergyHatch energyHatch = (TileEnergyHatch) tile;
5252
long remainingCapacity = energyHatch.getRemainingCapacity();
5353
if (simulate) {
54-
return amount - remainingCapacity;
54+
return Math.min(remainingCapacity, amount);
5555
}
5656

5757
if (remainingCapacity < amount) {

0 commit comments

Comments
 (0)