-
Notifications
You must be signed in to change notification settings - Fork 0
Key Features
DarkBladeDev edited this page Dec 27, 2025
·
1 revision
An addon must:
- Implement
MultiblockAddon. - Include
addon.properties. - Enforce namespacing:
- actions/conditions:
addonId:... - code-defined multiblocks:
addonId:... - matcher prefix:
addonId
- actions/conditions:
Registration:
ctx.registerAction("energy:energy_transfer", map -> new EnergyTransferAction(map));YAML usage:
actions:
on_tick:
- type: energy:energy_transfer
from: controller
to: neighbors
amount: 10Registration:
ctx.registerCondition("energy:energy_greater_than", map -> new EnergyGreaterThanCondition(map));YAML usage:
actions:
on_interact:
- type: message
value: "&aYou have enough energy"
conditions:
- type: energy:energy_greater_than
key: energy
value: 100Registration:
ctx.registerMatcher("energy", token -> new EnergyWireMatcher(token));Usage:
pattern:
- offset: [1, 0, 0]
match: "energy:wire_tier1"Notes:
- The parser tries to resolve
prefix:valueagainst registered matchers. - If there is no factory for the prefix, it falls back to the default behavior (material/tag/blockdata).
var type = ctx
.createMultiblock("cell")
.version("1.0")
.controller(new EnergyControllerMatcher())
.pattern(new Vector(0, 1, 0), new EnergyCasingMatcher())
.variable("energy", 0)
.withCapability("energy", instance -> new EnergyStorage(instance))
.build();
ctx.registerMultiblock(type);Besides ECA, you can hook into Bukkit/Paper with listeners:
ctx.registerListener(new Listener() {
@org.bukkit.event.EventHandler
public void onInteract(com.darkbladedev.engine.api.event.MultiblockInteractEvent e) {
// Implement domain logic without touching the core.
}
});Engine events (reference):
MultiblockFormEventMultiblockInteractEventMultiblockBreakEvent