Open ghost opened 5 years ago
Regular cows give regular milk. There's some other animals with different milk and some species with specific milks though;
However, animania already adds its own cheeses for these milks, all these milks oreDict to regular milk. Is it worth it to duplicate their existing cheese in growthcraft?
And if so, would growthcraft overwrite animania cheeses?
After waiting a while, the above seems to not work. So either way compatibility needs to be implemented.
The way of integration is not completely specified. But I see potential of doing so. There are some points to think about:
Regarding cow stomach drops, the baby mobs in Animania are handled as separate mobs entirely.
Drops for Animania are handled in loot tables: https://github.com/capnkirok/animaniamod/tree/1.12/src/main/resources/assets/animania/loot_tables
These come in 2 varieties for cows cow_prime.json and cow_regular.json. Maybe adding cow stomach drops to these loot tables by appending objects to the jsons could be the way to go? https://stackoverflow.com/questions/23724221/java-append-object-to-json#answer-32304677
@Deshiba Avoid injecting data into another mod's configuration
Instead you should open an issue with animania requesting a API for adding loot
Then Growthcraft can utilize that API/channel for adding any additional loots it needs, Growthcraft shouldn't be poking around another mods data files, if they decide down the line to change the format (or worst get rid of the file all together) you'll have a handful fixing it
As for the various milks provided, if you know their name I think tagging them with MILK in Growthcraft's Fluid Tag registry would fix a few problems, granted all the recipes in Growthcraft should be using OreItemStacks and TaggedFluidStacks where possible
I haven't worked in 1.12 so I don't know how much the fluids system has changed overall, and if the tagged system is still relevant.
@IceDragon200 Valid points that I had not considered.
However with Animania having 111 open issues and development having slowed down and it getting picked back up after inventory pets gets an update an API might take a while.
In the mean time if there could be a way to (temporarily) provide stomach drops on animania cow slaying that'd be nice for compatibility
@Deshiba
Well if the file is really an asset, you can provide a guide for adding stomachs to their loot table and then maybe even package it as a resource pack for those that don't want to poke around the files
When looking into loot tables after a little exchange with Tchipp (animania dev) I landed on the forge doc on loot tables https://mcforge.readthedocs.io/en/latest/items/loot_tables/#modifying-vanilla-loot
This states "Not only can you specify your own loot tables, conditions, functions, and entity properties, you can also modify others as they load."
According to that doc you can insert your own loot into existing loot tables. This can be done for vanilla and for modded loot tables. Technically the code that adds stomachs in EntityDropsHandler.java could be replaced by an insertion into the loot table for vanilla cows.
There's a minecraft forge tutorial on loot tables here https://github.com/Minecraft-Forge-Tutorials/Loot-Tables/blob/master/src/main/java/net/darkhax/tutorial/loottables/LootTablesMod.java
Since animania also adds loot tables for their entities the insertion would be the same. In this way it doesn't matter if the code on their end changes as long as the name of that loot table would remain constant the insertion on load would still be present without breaking anything.
I understand that best practice is becoming using the JSON functionality, specifically because of this future-proofing, not requiring an API, and being a shared standard.
Animania ( https://minecraft.curseforge.com/projects/animania ) is a mod about additional types of cattle and animals with a more advanced mechanics of keeping them (e.g. pigs like mud pits, animals must be feeded). There are up to five or six different types for cows, pigs, chickens and sheeps each. Additionally there are goats as well and other animals which are not existing in vanilla MC.
For the growthcraft integration, there are a lot of different milk types which could be used to create more variations of cheese.