diff --git a/build.gradle b/build.gradle index 45e095ab6..ad1c40f87 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ if (ENV.BUILD_NUMBER) { } minecraft { - version = "1.9-12.16.0.1786-1.9" + version = "1.9-12.16.0.1797-1.9" mappings = "snapshot_20160316" replace "@MODVERSION@", project.version // makeObfSourceJar = false diff --git a/src/main/java/techreborn/power/TRPowerNet.java b/src/main/java/techreborn/power/TRPowerNet.java index 5e1fdee1b..265a94d04 100644 --- a/src/main/java/techreborn/power/TRPowerNet.java +++ b/src/main/java/techreborn/power/TRPowerNet.java @@ -246,7 +246,7 @@ public class TRPowerNet { public int collectEnergy(int max) { int total = 0; if (tile.canProvideEnergy(side.getOpposite())) { - int collect = (int) Math.min(max, tile.getMaxOutput()); + int collect = (int) Math.min(max, Math.min(tile.getMaxOutput(), tile.getEnergy())); total = (int) tile.useEnergy(collect, false); } return total; @@ -268,7 +268,7 @@ public class TRPowerNet { } public int getTotalCollectible() { - if (tile.canProvideEnergy(side.getOpposite())) { + if (tile.canProvideEnergy(side.getOpposite()) && tile.getEnergy() != 0) { return (int) Math.min(tile.getMaxOutput(), tile.getEnergy()); } return 0; @@ -276,7 +276,7 @@ public class TRPowerNet { public int getTotalInsertible() { int total = 0; - if (tile.canAcceptEnergy(side.getOpposite())) { + if (tile.canAcceptEnergy(side.getOpposite()) && tile.getMaxPower() - tile.getEnergy() != 0) { total += tile.addEnergy(type.transferRate, true); }