[PR Request] Additional auto-gen for crops & bug fixes
MUYUTwilighter opened this issue ยท 3 comments
Developped upon 1.20.1 fabric v4.5, using yarn decompilation
Forked Project: https://github.com/MUYUTwilighter/Croparia
- CropariaCrops drops items according to loot tables instead of spawning item entities
- Auto load loot tables generated by java codes. (generated json files will loaded before external datapacks)
I did these changes because in this way modpack authors can modify the drops of croparia crops.
To be honest, I did not understand what you changed xD
Like, I removed the generation of json file to be compatible with other mods. This way, I can add a line in the CropInit file and everything is added automatically. Also, is a mod is not loaded (like Techreborn for exemple), the associated crops will not load. If there is loottable or models file associated with the crops, some errors will appears. How do you handle that ?
For detailed changes, you can view the commit record of the forked project. A bug that might destroy a chunk #22 is found and fixed
Other questions you mentioned had been raised while I am working on the forked project.
I have notice that you are using item tags to figure out what specific resource to be converted to. So, the loot table that the mod generated will only yield fruit item (which is specified), and the loot table will only be created and loaded when a specific kind of crop is "valid" (the corresponding resource exists, or shouldLoad
in your code), so no warnings nor errors will occur.
For model files, due to Mojang's algorithm in handling resource packs, if there is a model file while no block or item is assigned, no warnings nor errors would present.
What's important, all the data & resource files will always be loaded firstly (or have the lowest priority), which means if users do not favour the auto-gen, they can customize theirs via data & resource packs.
Forked Project: https://github.com/MUYUTwilighter/Croparia
Additional changes:
Add auto -generated resources: models for block, item(fruit and seeds), en_us language.
All resources generated will be loaded advanced of any other resource packs.