Updates to the awareness block #55
@ -82,9 +82,10 @@ public class AwarenessBlockEntity extends BlockEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean deductEnergyUse() {
|
public boolean deductEnergyUse(int radius) {
|
||||||
if (energy.getMaxEnergyStored() >= ENERGY_REQUIRED) {
|
int cost = radius * ENERGY_REQUIRED;
|
||||||
energy.extractEnergy(ENERGY_REQUIRED, false);
|
if (energy.getMaxEnergyStored() >= cost) {
|
||||||
|
energy.extractEnergy(cost, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user