Check for ability to output from side. Closes #2822
This commit is contained in:
parent
ff56edb2c3
commit
21515c8908
2 changed files with 6 additions and 3 deletions
|
@ -65,7 +65,10 @@ public abstract class PowerAcceptorBlockEntity extends MachineBaseBlockEntity im
|
|||
|
||||
@Override
|
||||
public long getMaxExtract(@Nullable Direction side) {
|
||||
return PowerAcceptorBlockEntity.this.getMaxOutput(side);
|
||||
if (PowerAcceptorBlockEntity.this.canProvideEnergy(side)) {
|
||||
return PowerAcceptorBlockEntity.this.getMaxOutput(side);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
private RcEnergyTier blockEntityPowerTier;
|
||||
|
|
|
@ -162,8 +162,8 @@ public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements
|
|||
@Override
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("aesu").player(player.getInventory()).inventory().hotbar().armor()
|
||||
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
|
||||
.syncEnergyValue().sync(this::getCurrentOutput, this::setCurrentOutput).addInventory().create(this, syncID);
|
||||
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
|
||||
.syncEnergyValue().sync(this::getCurrentOutput, this::setCurrentOutput).addInventory().create(this, syncID);
|
||||
}
|
||||
|
||||
public int getCurrentOutput() {
|
||||
|
|
Loading…
Reference in a new issue