Repository navigation
Generator overview
A generator in eGens is a placed block that ticks on a fixed
interval and produces loot for its owner. Generators belong to a
tier (wood, iron, diamond, …); tiers are organised into
chains that the player promotes up by spending in-game currency.
This page is a high-level model of how the pieces fit together.
Detailed schemas live under /config/
and the premade tier chains page.
Player → places → Generator block
├── tier (wood, iron, diamond, …)
├── level (within the tier, 1 → max-level)
├── durability (corruption budget)
├── owner uuid
└── ticks every <tick-interval> ms
└── rolls loot from drops.yml entries
listed in the tier's `drops:` field
→ items spawn directly above the block
A tier is one rung in a progression. It's defined in a YAML
file under generators/. Each tier has:
-
display-name,lore— visual identity. -
material— the world block. -
base-capacity,base-durability,tick-interval— economy knobs. -
max-level— how many/egens upgradelevels are available within the tier. -
next-tier(optional) — chain pointer for tier promotion. -
shop-price— what the shop charges for the placeable item. -
repair-cost,repair-cost-per-level— economy of repairs. -
drops:— list of drop ids fromdrops.ymlrolled on each tick.
A chain is a set of tiers linked by next-tier. eGens ships
three chains by default — vanilla_chain.yml, mob_chain.yml,
elemental_chain.yml — but you can:
- Replace any of them.
- Add more chains (every
.ymlfile undergenerators/other thandrops.ymlis scanned at boot). - Mix tiers across chains (
vanilla:diamondcannext-tier: elemental:firefor instance — chains are just naming conventions, the runtime treats every tier id as flat).
Tier ids must be globally unique across all chain files. The loader rejects duplicates with an explicit error at boot.
generators/drops.yml is the single source of truth for every
sellable item. Tier files reference drops by id, not by
Material, so the same drop can be reused across tiers without
duplicating its definition. This is also what enables sellable
custom-head drops — the world drop is stamped with the drop id in
its persistent data, and the sell pipeline looks the price back up
in drops.yml.
See Drops registry for the schema.
Every placed generator has its own row in the database tracking:
- Tier id, level, durability, owner uuid.
- Last-tick timestamp (for tick-interval enforcement).
- Optional cosmetic state (hologram visibility, sound preference).
Generator state is never preserved on break. Breaking a generator always drops the base tier item only — level, durability, and any in-flight ticks are lost. This is intentional; it removes a whole class of dupe vectors.
-
Tick scheduler wakes a generator every
tick-intervalms (per-region thread on Folia, per-world thread on Paper). -
Owner activity gate — if the owner is offline or further
than
owner-activity.max-distance-blocksaway, the tick is skipped. - Per-generator lock is acquired so concurrent threads can't double-tick the same block. This is the anti-dupe boundary.
-
Loot roll uses the tier's
drops:list, weighted by each drop'sweight:. The roll happens off-thread whenperformance.async-loot-roll: true. -
Corruption check rolls a per-tick corruption chance and
decrements durability. If the generator corrupts, the world
block is swapped to
corruption.cracked-materialand ticks are paused until repaired. -
Items spawn directly above the block.
generation.drop-scattercontrols the initial velocity (0.0 = straight up, 1.0 = vanilla scatter). -
Audit log records the tick (if
anti-dupe.audit-log: true).
Two upgrade kinds are available via /egens upgrade:
-
Level upgrade — within the current tier, up to
max-level. Cost:upgrade.level.cost-formulaevaluated with the generator's currentlevel. -
Tier promotion — when the generator is at
max-leveland the tier has anext-tier:pointer. Cost:upgrade.promotion.cost-formulaevaluated with the destination tier's 1-based ordinal.
Quotes are returned without charging. The player runs the command
a second time to confirm. If state changes between the quote and
confirmation (e.g. a concurrent upgrade by an admin), the second
call refunds and aborts with command.upgrade.desync.
-
corruption.mode: CHANCE— pure random chance per tick. -
corruption.mode: DURABILITY— every tick costs one durability point; when it hits zero the generator corrupts. -
corruption.mode: HYBRID(default) — both checks active.
A corrupted generator paused via cracked-material swap. The
owner runs /egens repair (or the Repair tile in the generator
GUI) to restore it, paying the formula in
corruption.repair.cost-formula.
Placement caps are evaluated in order, lowest precedence first:
-
Per-world (
limits.per-world.<world>) — overrides per-player for listed worlds. -
Per-chunk (
limits.per-chunk) — hard cap per chunk across all owners. -
Per-player (
limits.default-max-per-player+ the additive permission prefix).
egens.limit.bypass skips them all.
-
Premade tier chains — what ships in the
bundled
generators/folder. - Custom tiers — author your own chain in YAML.
-
Drops registry — the
drops.ymlschema. - Balance guide — tweak tick interval, capacity, price.
Tip on Ko-fi keeps maintenance going.
eGens Docs
Getting started
Commands
Configuration
Generators
Integrations
Operations