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() { 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;
} }