Updates to the awareness block #55

Merged
BlakeRain merged 10 commits from BlakeRain/utamacraft:main into main 2024-01-23 14:41:55 +00:00
Showing only changes of commit bdcc8549d3 - Show all commits

View File

@ -82,9 +82,10 @@ public class AwarenessBlockEntity extends BlockEntity {
}
}
public boolean deductEnergyUse() {
if (energy.getMaxEnergyStored() >= ENERGY_REQUIRED) {
energy.extractEnergy(ENERGY_REQUIRED, false);
public boolean deductEnergyUse(int radius) {
int cost = radius * ENERGY_REQUIRED;
if (energy.getMaxEnergyStored() >= cost) {
energy.extractEnergy(cost, false);
return true;
}