Add energy storage upgrades.

This commit is contained in:
modmuss50 2017-04-11 19:26:46 +01:00
parent 1ccd192790
commit 6355d11b0f
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
2 changed files with 11 additions and 8 deletions

View file

@ -155,7 +155,9 @@ public class ContainerTileInventoryBuilder {
public ContainerTileInventoryBuilder syncEnergyValue() {
if (this.tile instanceof TilePowerAcceptor)
return this.syncIntegerValue(() -> (int) ((TilePowerAcceptor) this.tile).getEnergy(),
((TilePowerAcceptor) this.tile)::setEnergy);
((TilePowerAcceptor) this.tile)::setEnergy)
.syncIntegerValue(() -> (int) ((TilePowerAcceptor) this.tile).extraPowerStoage,
((TilePowerAcceptor) this.tile)::setExtraPowerStoage);
Core.logHelper.error(this.tile + " is not an instance of TilePowerAcceptor! Energy cannot be synced.");
return this;
}