#Get how much hunger an item restores?
17 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
there is Nutrition and saturation modifier, for example
Here is some values from foods, and the script I made get only foods with >= 0.6 saturation modifier
This is great, thanks! I want to do some stuff with this data using a python script, so is there a way to get just the names of the items?
you can export the items to json using JsonIO
did you decided which values you want to filter? from nutrition/saturation mod
I just want all items that restore any hunger at all
All the food items, pretty much
So I set it to >= 0
Whoops, I meant > 0
use JsonIO.write("local/kubejs/foodItems.json", {"foods": list})
Also, I can't find an example of json io exporting in example-scripts, do you know where I can find one?
well, perfect!
Alright, that's everything I need to do some chicanery, thanks so much!
Pretty much I want to set an AdminShop sell price for all of the food items. I'll start by creating a tree of crafting recipes for the food to determine the root items (eg. crops, raw meat, etc.) and give them a manual price. Next, I'll work my way up the tree and set the price of any items that have all of their ingredients prices set, generally to the sum of all of the ingredient prices * some constant like 1.2 or something based on the crafting method.
Fun little weekend project for a modpack I've been meaning to make for a long while 🙂