Description
New Mod Icon Same Mod!
If you are just looking for the testing tools check out my other plugin --EZDEV (coming soon) which has the teleporter tools and much more in it like a Ui based whom to whom tp menu, ore tp, biome tp, and more coming!
Original Idea for the mod came from Coal! by Meowerz (MIT)
Important Reminder: make this plugin a dependency of your mod on Curseforge if you are using it to inject ore for your asset packs. to do this when you upload your mod for the first time to curseforge at the bottom of the page where its asking for your "change log" you will see "add related project" click that and type out "OreGenLib" without the quotes this should allow you to select this plugin and add it as a dependency! (You may want to put it in the description of your mod that it installs this mod as a required mod for if someone sees this mod and uninstalls it because they dont know what it is it will not inject the ores anymore either and the base game will not send a warning about dependency missing for normal asset zipped mods only Jar "Plugins" as of update 2.
--I will update this paragraph if they add dependency driven errors for zipped asset mods and explain then how to add as a dependency in manifest file.
OreGenLibrary (MIT) — XML-Driven Ore Worldgen + Ore/Biome/Zone Admin UI & Teleport Tools
OreGenLibrary is a configurable ore-generation library that lets modpack authors add or tweak ore generation using a simple XML file — no code required. It also includes in-game UI pages (assets) for browsing ores/biomes and exporting documentation.
What this mod does
1) Loads ore generation rules from XML
OreGenLibrary automatically scans installed mods folder for asset packs containing this file:
✅ Ore_Gen/CustomOreTypes.xml
It merges all found configs and uses them to drive worldgen.
Where your XML goes inside your pack/mod:
YourPackOrMod/
manifest.json
Ore_Gen/
CustomOreTypes.xml
You can have multiple asset packs containing
Ore_Gen/CustomOreTypes.xml— OreGenLibrary merges them all.
2) Injects ores into world generation (how injection works)
OreGenLibrary hooks into the server’s chunk generation pipeline and applies your ore rules only when a chunk is newly generated.
Important vanilla-style rule: existing chunks don’t change automatically — to see new ore rules, explore new chunks (or use the retrogen tools below).
3) Supports two placement styles (your choice)
OreGenLibrary supports both approaches — choose what fits your pack:
A) Spawn / Replace-Host placement
A classic ore generator that places veins based on:
chancePerChunkveinsMin / veinsMaxveinSizeMin / veinSizeMaxyMin / yMax- plus per-variant host replacement rules
This is “manual control” and is great when you want exact tuning.
B) Template / Near-Vein injection
Anchors your custom ore placement near existing base-game ore families (Iron/Copper/etc) rather than purely random placement.
This is useful when you want your modded ore distribution to “follow” where a base ore family exists.
Neither mode is “recommended” — they are different tools for different balancing goals.
4) Powerful filters (biomes, zones, categories)
Every ore rule can be restricted using filters such as:
- Biome includes/excludes (token matching)
- Zone and Tier matching (ex: Zone 4 tier 5 only)
- Category / discovery keys (shore/underground/etc)
- Prefix matching for biome/zone families
This lets you do things like:
- “Spawn only in Zone 4 underground”
- “Spawn only in Desert stacks biomes”
- “Spawn only in shore categories”
- “Separate variants per host (Stone/Basalt/Sandstone/etc)”
5) Admin UI pages (browse + teleport tools)
OreGenLibrary includes custom UI pages that provide:
- Ore list UI: searchable list of loaded ore IDs and actions
- Biome list UI: browse all biomes from the current generator
- Known-biomes UI: probe biome map around you and list nearby biomes
- Guide UI: in-game documentation + export tools
- RetroGen Prompt: allows specific users to allow the retroGen Sytem to run
6) Safe teleporting + “Last Known” ore locations
Teleport tools include:
- Safe teleport logic (tries to avoid spawning you inside blocks by finding a valid nearby space)
- Probe without teleport (store a representative coordinate)
- Last Known stored locations (persistent between restarts)
Commands (Creative/admin group)
Root command:
/customoregen
Aliases:/cog/COG
/cog reload
Reloads all CustomOreTypes.xml configs (rescans).
- Optional:
--clearre-applies rules to currently loaded chunks around you (does not delete chunks; can affect underground builds) - Optional:
--radius=<chunks>(used with--clear)
/cog retrogen
Budgeted re-application over nearby chunks (safety tools included): (NOW Fully Implemented)
--radius=<chunks>(default 2)--maxY=<y>(default 45)--budget=<chunks>(default 120)--dry(simulate / preview)--confirm(required to actually run)- --forceallores (use caution and read retrogen section at the bottom of this description)
/cog guide
Opens the in-game Modder Guide page.
/cog listore
Opens a searchable UI list of ore IDs loaded from XML.
/cog listbiomes
Lists all biomes configured by the current generator (includes mod-added biomes).
/cog listknownbiomes [--radius=<chunks>]
Probes the biome map around you and lists the set of biomes seen (does not require chunks to already exist).
/cog currentbiome
Prints a one-line output showing your current Biome + Zone.
/cog tp
Teleport helper (ore or biome). Arguments supported include:
ore(custom ore id OR base ore family name)biome(biome token or full biome name)radiusmaxYnext(skip first N matches)fallback(ore fallback chunk load radius)last=1(teleport to stored last-known for ore)probe=1(store a result without teleporting)x/z(manual coordinate overrides)label(optional logging label)
For the exact argument format your server build expects, open
/cog guidein-game — it shows examples.
Where to find the docs + exports (HTML / examples / spreadsheet)
XML Builder Tutorial (YouTube) - Coming Soon!
In-game Guide
Use:
/cog guide
The guide page includes Export Help Docs buttons that write files to a stable folder on disk.
Export output folder (default)
Exports are written to:
%AppData%\Hytale\UserData\Mods\oregenlibrary-data\docs
(You can override the Mods directory with the env var OREGENLIB_MODS_DIR.)
What the guide currently exports via buttons
exampleCustomOreTypes.xmlOreGenLibrary_XML_Reference.htmlTemplateDictionary.html
Where the spreadsheet is
- The rarity spreadsheet is bundled inside the mod JAR at:
docs/OreRarity_UserGuide.xlsx
Notes on world updates / vanilla changes
Vanilla worldgen updates often require new chunks to reflect new ore distribution. OreGenLibrary behaves the same way for injection: newly generated chunks receive the rules automatically; existing chunks need retrogen tools if you want changes applied retroactively.
License
OreGenLibrary is released under the MIT License (keep attribution + license if redistributing).
NEW FETURES V 1.0.8
RetroGen System is now fully implemented!
a permission is now availible for servers running this mod, you can grant oregenlib.retrogen.prompt or dtapgaming.oregenlibrary.retrogen.prompt to allow admins to accept retrogen Prompts.
When a person logs in that has permission to handle retrogen prompts they will be able to accept or decline them. The prompt will auto initiate for a play with permission once a server starts that has had New ores implemented in any form that is using OreGenLib. meaning if for example a mod that you are already running adds a new ore that they didnt have before it will trigger asking if you would like to add these new ores. If you add a Completely new mod that uses OreGenLib the same prompt will happen for all of the new ore types of that new mod.
What is "Retrogen"? - Retrogen is a system that will forcefully inject new ore types into chunks that have already been explored. (NOTE: this system can and most likely WILL cause some lag on larger servers that have a lot of chunks already explored. NOTE2: This system might cause server tick spam in your server log when it is running, it is asking a lot of the game (and lower end servers) to try to forcefully inject blocks and delete blocks from chunks that are already loaded.) There is now a file in your server called
oregenlibrary-retrogen.properties
that will allow you to set whether users are even prompted, Default setting is prompt, but you can also use auto_accept or auto_decline for the policy
you can set a few other configurations in that same properties file for the following:
safety range not to retrogen near play placed blocks (torches excluded) default=20
max_y axis default is 310 (lower this if you dont want ores injected into mountians)
force exclude surface - this setting is to attempt to prevent immersion breakage near players houses (random ores poking through the crust of orbis in their yards) - NOTE: another new feature in this update is for mod makers to have surface only ores - turning this to true will prevent retroGen of surface only ores - but do not fear this only blocks the retrogen so they will still spawn surface ores in newly generated chunks)
And then your budget for retrogen speed you can lower these settings if the lag is too much to handle on your server during retrogen, options are how many chunks are being ran at once, how long it hits those chunks for, how long it waits before running another attack on the current or next chunk, and the scan budget of blocks scanned per chunk per pass.
You can now also Force a retrogen of all modded ores using OreGenLib aswell. this will allow you to inject ore types that were added prior to this patch BUT DO NOTE it does NOT delete the ores that were previously injected so an area may get double the amount of ores its supposed to have if you run it on chunks that had some of the ores injected but not others.
New FEATURES for mod makers!!!:
- You can now exclude your ore types from spawning on the surface (aka Crust) you can also reverse this
- You can now FORCE your ores to ONLY be on the top x layers of the surface!
- You can now define what the chance PER VARIANT are not just the chance per ore type meaning you can state that the ore will be more plentiful the lower you get or higher you get. example is stone might have a 0.05 chance (5%) but volcanic might have a 0.25 (25%) chance to trigger.
(also updated the server version to match again to stop warnings)
