OreGen — how it works (and stays vanilla-safe)
What OreGen does (in one sentence)
OreGen replaces the single cobblestone that vanilla would form with a configured ore
only when it detects a strict, vanilla-looking setup. Otherwise, it leaves everything 100% vanilla.
The strict layout rule (core mechanic)
OreGen will
only trigger when the target block sits in this exact straight-line pattern (no diagonals):
Water Source → Flowing Water → [TARGET BLOCK] → Lava Source
- Water Source: a true source block (level 0)
- Flowing Water: non-source water moving toward the target
- [TARGET BLOCK]: the spot vanilla would fill with cobblestone/stone
- Lava Source: a true lava source block (level 0)
- Exactly one lava source may touch the target block; otherwise OreGen won’t trigger
If (and only if) this pattern is met, OreGen:
- Cancels the normal block-forming event for that one target block
- Selects an ore from the player/world generator config
- Places that ore at the target position (optionally with sounds/particles if enabled and supported)
Event paths (modern and legacy)
How OreGen preserves vanilla behavior (safety net)
OreGen
falls back to vanilla (does nothing) in all of these cases:
- Flowing water touches flowing lava (no lava source on the lava side)
- Multiple lava sources adjacent to the target
- No water source behind the flowing water
- Lava is the moving fluid (instead of water)
- Target isn’t valid for vanilla formation (not air/water)
- Downward flow when [tt]enable-stone-generator[/tt] is false
- World disabled (via plugin config)
- Particles/Sounds unsupported: visuals/audio are skipped; block logic remains vanilla-safe
Where the ore choice comes from
When the rule matches, OreGen asks the per-player/per-world GeneratorConfig for a random item:
GeneratorConfig → GeneratorItem → Material (+ optional damage/meta)
That material is placed at the
target block (the same spot vanilla would have placed cobble/stone).
Demo: OreGen in action
What to show
- Lay out: Water Source → Flowing Water → Air → Lava Source
- When vanilla would create cobblestone, OreGen replaces that one target block with a configured ore
- Repeat in all four cardinal directions to show it only works in straight lines (no diagonals)
Demo: Vanilla safety net
Show these cases
- Flowing vs. Flowing: Flowing water meeting flowing lava → vanilla cobblestone/stone (no ore)
- Multiple lava sources near the target → vanilla forms (no ore)
- No water source behind the flow → vanilla forms (no ore)
- Lava-moving scenario: Lava is the moving fluid → vanilla forms (no ore)
Quick test checklist
- ✔ Exact pattern triggers ore
- ✔ Any deviation (extra lava source, missing water source, diagonals, flow↔flow) → vanilla only
- ✔ Only the one target block is ever replaced; nearby blocks remain vanilla
- ✔ Disabled worlds and downward-flow rules respect your config