Mrbysco / Spoiled

Spoiling the end of your food supply since 2020
https://www.curseforge.com/minecraft/mc-mods/spoiled
MIT License
7 stars 5 forks source link

[Suggestions] Food stacking #18

Closed TqLxQuanZ closed 1 year ago

TqLxQuanZ commented 3 years ago

SUGGESTIONS

SUGGESTION INFORMATION

Because individual foods have their own spoil rate, this causes multiple repeating foods with different spoil rate flooding the inventory. It would be good if there is a config that allows for toggling food with different spoil rate stacks together, but the spoil rate takes the (item1) + (item2) = (item3)'s spoil rate. An example would be (stale + fresh) = (edible), (fresh + fresh) = (fresh), (stale + stale) = (Stale but slightly higher), basically adding the percentage together.

Similar concept can be found through Don't Starve Together.

Mrbysco commented 3 years ago

This has been suggested before in #10 There just isn't an easy way for me to implement this. I'll keep looking into it

TqLxQuanZ commented 3 years ago

I see, thanks for the quick reply, I've been using your mod for quite a while and didn't expect it is such a hard task.

Mrbysco commented 3 years ago

I would have to mess with the areItemStackTagsEqual check that is used and insert a special check just for the spoiling. I'll see what I can do

HookerHeels commented 2 years ago

Any progress on this? This is the only reason I don't use this mod and would really love to.

Mrbysco commented 2 years ago

Currently there's no feasible way to implement this feature

Mrbysco commented 2 years ago

I've added an config option in 1.5.1 (uploaded a minute ago so still under approval) that allows you to craft foods together

It's currently disabled as it has to be properly tested

Lonemind commented 2 years ago

It appears that the crafting option works great. I've not run into any bugs with it.

I would suggest a different formula you use, though. Currently it averages the percentage between the two stacks. This means that I can split a stack of 0% spoiled food into singles and keep adding them to a stack of 50% spoiled food to bring down the spoilage rate until the 50% becomes 0%.

I'm not that great at math but it seems like you would want to add the spoilage of all the food items and then divide it by the number of food items rather than averaging the percentage between the two stacks.