Update forge + powernet improvements
This commit is contained in:
parent
b41472089c
commit
eec6139d33
2 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ if (ENV.BUILD_NUMBER) {
|
||||||
}
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "1.9-12.16.0.1786-1.9"
|
version = "1.9-12.16.0.1797-1.9"
|
||||||
mappings = "snapshot_20160316"
|
mappings = "snapshot_20160316"
|
||||||
replace "@MODVERSION@", project.version
|
replace "@MODVERSION@", project.version
|
||||||
// makeObfSourceJar = false
|
// makeObfSourceJar = false
|
||||||
|
|
|
@ -246,7 +246,7 @@ public class TRPowerNet {
|
||||||
public int collectEnergy(int max) {
|
public int collectEnergy(int max) {
|
||||||
int total = 0;
|
int total = 0;
|
||||||
if (tile.canProvideEnergy(side.getOpposite())) {
|
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);
|
total = (int) tile.useEnergy(collect, false);
|
||||||
}
|
}
|
||||||
return total;
|
return total;
|
||||||
|
@ -268,7 +268,7 @@ public class TRPowerNet {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTotalCollectible() {
|
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 (int) Math.min(tile.getMaxOutput(), tile.getEnergy());
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -276,7 +276,7 @@ public class TRPowerNet {
|
||||||
|
|
||||||
public int getTotalInsertible() {
|
public int getTotalInsertible() {
|
||||||
int total = 0;
|
int total = 0;
|
||||||
if (tile.canAcceptEnergy(side.getOpposite())) {
|
if (tile.canAcceptEnergy(side.getOpposite()) && tile.getMaxPower() - tile.getEnergy() != 0) {
|
||||||
total += tile.addEnergy(type.transferRate, true);
|
total += tile.addEnergy(type.transferRate, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue