public int getEnergy() return energy; public int getMaxEnergy() return MAX_ENERGY; public void setEnergy(int amount) this.energy = Math.min(MAX_ENERGY, Math.max(0, amount)); public void addEnergy(int amount) setEnergy(energy + amount); public boolean consume(int amount) if (energy >= amount) energy -= amount; return true;
The standard built-in energy system for the Minecraft Forge platform. energy client minecraft
Energy clients help manage buffers. Without a proper interface, machines may pull more power than your grid can provide, leading to a total system brownout. 2. Throughput Limits public int getEnergy() return energy
(in client-common mixin)