Update forge + powernet improvements

This commit is contained in:
modmuss50 2016-03-22 20:03:46 +00:00
parent b41472089c
commit eec6139d33
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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);
}