-
Notifications
You must be signed in to change notification settings - Fork 0
Energy System
DarkBladeDev edited this page May 10, 2026
·
1 revision
The Energy System is a specialized layer built on top of the Wiring System. It provides a standard way to handle power production, consumption, and storage across your multiblock machines.
Producers generate energy (e.g., Solar Panels, Generators).
- Rate: How much energy they produce per tick.
- Buffer: Internal storage before pushing to the network.
Consumers use energy to perform tasks (e.g., Electric Furnaces, Miners).
- Demand: How much they need to operate.
- Behavior: What happens when they run out of power? (e.g., State changes to INACTIVE).
Storage modules (Batteries, Capacitors) hold energy for later use.
- Capacity: Maximum energy they can hold.
- I/O Rate: How fast they can charge or discharge.
When producers and consumers are connected via ENERGY type cables, they form an Energy Network.
- Distribution: The engine automatically distributes power from producers to consumers.
- Priority: Certain machines can be given higher priority for power.
- Losses: (Optional) Networks can be configured to have energy loss over distance.
While the logic is often handled by Java addons, you can define energy-related variables and states in YAML:
id: electric_furnace
variables:
energy_stored: 0
energy_capacity: 10000
actions:
on_tick:
- type: conditional
conditions:
- type: variable
key: energy_stored
value: 10
comparison: GREATER_OR_EQUAL
then:
# Perform work and consume energy
- type: modify_variable
key: energy_stored
operation: SUBTRACT
amount: 10Accessing the energy system in Java:
@InjectService
private EnergyService energyService;
public void chargeMachine(MultiblockInstance instance, double amount) {
EnergyStorage storage = energyService.getStorage(instance);
storage.receiveEnergy(amount, false);
}-
EnergyProducer: Implement for generating power. -
EnergyConsumer: Implement for using power. -
EnergyStorage: Implement for storing power.