Add energy storage upgrades.
This commit is contained in:
parent
1ccd192790
commit
6355d11b0f
2 changed files with 11 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue