HyVoltz
HyVoltz is a lightweight energy network library for Hytale mods. It provides a standardized way to move power between blocks without forcing a specific gameplay mechanic or tiered system on your users.
It is not a tech mod, a machine pack, or a gameplay overhaul. It is strictly a library for developers.
The Mental Model
Think of HyVoltz as a Graph Manager. You tell it which blocks are nodes, and it handles the graph traversal, network merging, splitting, and energy balancing every tick. You focus on your machine logic; HyVoltz handles the "wires". The entire network is handled as one whole unit.
Core Features
- Ad-hoc Networks: Networks form and dissolve automatically based on adjacency.
- Tick-Optimized: Energy distribution is solved once per network per tick, not per block.
- Side-Sensitive: You control exactly which sides of your block can input or output power.
- Implementation Agnostic: No "voltage" or "packets". Simple long values representing HyVoltz or HV.
What HyVoltz Does NOT Do
- No Cables: You simply implement your own cable blocks (they are just
CONNECTOR nodes).
- No Persistence: Networks are runtime-only. You must save your machine's buffer to NBT/Component storage yourself.
- No Visuals: You control all rendering.
Usage Example
// In your BlockComponent
HyVoltzNodeComponent powerNode = new HyVoltzNodeComponent(new MyGeneratorNode());
// Attach when block is placed/loaded
powerNode.attach(world.getUuid(), blockPos);
// In your tick loop, logic runs automatically
// HyVoltz moves power from Producers -> Consumers