EwyBoy / OreTweaker

Add, remove, tweak and configure ore and underground generation features for Minecraft Forge
https://www.curseforge.com/minecraft/mc-mods/ore-tweaker
MIT License
20 stars 7 forks source link

[Help-Wanted] Port OreTweaker to 1.19 and beyond #96

Closed EwyBoy closed 2 months ago

EwyBoy commented 1 year ago

Ore Tweaker porting beyond 1.18 issues threads 🧵

kaisadilla commented 2 months ago

I don't know if this mod will be ported, but from 1.19 on, ore generation is managed via datapacks. Unless a mod hardcodes it, you can find this data in data/worldgen/configured_feature (which defines how ore veins are generated) and data/worldgen/placed_feature (which defines how these veins are actually placed in the world). These two look extremely similar to how it was done in this mod, and should cover the same use-cases. To prevent an ore from spawning, simply set its placed_feature json to an empty one (i.e. {}).

EwyBoy commented 2 months ago

This is the main issue with porting the mod. Before I generate the configured and placed features on the fly using code. Now it has to be hardcoded into the datapack on launch.

Users were able to using my json based system to tweak their ore generation and my mod would construct and register the world generation using code on launch.

Since this is no longer possible, the only solution would be to generate a datapack on launch before Minecraft has a chance to do its things and inject the datapack into Minecraft.

I am just not sure if it is possible to do, and I have a hard time figuring out how to achieve exactly this. It is very close to how it was done before but since u cannot do it using the registries anymore it complicates it a whole lot.

I essentially need to be able to construct a datapack at runtime and inject it into Minecraft.

Any help with this or anything pointing me in the right direction is very much appreciated.

EwyBoy commented 2 months ago

https://github.com/EwyBoy/OreTweaker/discussions/106