A cursed mod that allows you to automatically run and reload datagen from inside your world.
The mod's functionality is only enabled when you are in a development environment.
You have two options, either:
- Install the mod manually from GitHub Releases
- Add the mod as a development-only dependency in your gradle file:
repositories {
maven("https://maven.mim1q.dev")
}
dependencies {
modLocalRuntime("dev.mim1q:runtimedatagen:0.0.2")
}This mod makes a few assumptions about the environment:
- your mod must have its generated resources in
src/main/generated/or a similar path, relative to yourgradlewfile; - you must have the
fabric-api.datagen.output-dirproperty set in your Minecraft Client configuration (This may just be copied from the Data Generation configuration). - you have reloaded your sources in case you've changed anything
After that is done, press the O key while in-world (configurable under Key Bind settings), and let the mod do its job :)
In case this mod gets flagged as malicious due to its usage of reflection and process spawning, feel free to verify the code in the main class, compile it yourself or incorporate it into your own project (CC0 license - attribution not required, but appreciated 😊).