Closed nmarshall23 closed 7 years ago
I'll get this into mainline JMOD with the 1.0.6 release. For now, the main target is picking up the project and consolidate the rather chaotic dev version I have locally. I'm not entirely sure if I can just merge this when I get to the point where I am ready to, or if I will have to manually bunk it in, but thank you for your contribution already in either case.
I have some issues with my patch. I would like food created by JMOD to not require the script author to explicitly make call to modifyFoodValue. I'm not sure how to do that.
I'll have to review how things are done before I can give you an answer to this.
Merged into master and indev. Builds in indev, please test if your functionality is retained properly.
Also: Why would it be desirable to modify just created food?
I would imagine this would allow food creation and food modification to happen in two steps. That way, the same algorithm defining what qualities food should have will work on both created and prior-existing food.
Why would it be desirable to modify just created food?
Sorry I wasn't clear. I want to have both a function that let's me set the correct food values for foods from external mods. Also I want to have this function used automatically on food created by JMOD. It's kind of clunky to create a food then set the white listing.
However I didn't see an extension point for build-in functions.
This Pull Request adds a new function to script modifications to food values.
For example:
Applcore.modifyFoodValue("minecraft:carrot", 10, 0.5);
Would set carrots to restore 10 hunger and 5 Saturation.
Also if HungerOverhaul is loaded sends it a IMC so it doesn't over write any modifications to food values.