Skip to content

Project Structure

DarkBladeDev edited this page Dec 27, 2025 · 1 revision

Project structure

Recommended addon architecture

Split responsibilities to keep the addon scalable:

  • bootstrap: main class implementing MultiblockAddon
  • domain: model/services (energy, networks, machines, etc.)
  • integration: actions/conditions/matchers registered into the engine
  • listeners: your own listeners (if needed)
  • config: addon config loading (if applicable)

The engine core must not know your domain. The addon exposes its domain to the engine only through:

  • actions/conditions/matchers
  • code-defined multiblocks
  • listeners (optional)

Standard directory structure (Gradle)

Example:

my-addon/
  build.gradle
  settings.gradle
  src/main/java/
    com/tuorg/energy/
      EnergyAddon.java
      action/
      condition/
      matcher/
      capability/
      listener/
  src/main/resources/
    addon.properties

Naming conventions

  • Addon ID: lowercase, no spaces. Loader-accepted pattern:
    • ^[a-z0-9][a-z0-9_\-]*$
    • Valid examples: energy, machines, automation_v2
  • Mandatory namespacing:
    • Action/Condition keys: addonId:action / addonId:condition
    • Code-defined multiblocks: addonId:name
    • Matchers: the prefix must be exactly equal to addonId.

Clone this wiki locally