Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suggestion] spoiled food mechanic #5

Open
Biviho opened this issue Oct 9, 2023 · 0 comments
Open

[suggestion] spoiled food mechanic #5

Biviho opened this issue Oct 9, 2023 · 0 comments

Comments

@Biviho
Copy link

Biviho commented Oct 9, 2023

hi! if you want to update and fix some of the mechanics of the mod, i have a suggestion for the food spoiling mechanic, since there is no decent mod that do this on 1.12...
currently better with addons add an nbt tag to foods with the time of creation and, if i'm not wrong, it will check when the item is in the player inventory, or in the inventory that the player have opened to see if the item had reached it's expiration date.
this alone have the issue of not giving the ability to preserve foods, but the advantage of not being taxing on server tps since the check is not done often.

if you already have an idea on how to improve on this, great! but if you are intereste, here is mine: add the time the item was added to an inventory that can preserve food and, when the item is removed, use this new time to upate the time of creation with:

current time - (time of preservation - time of creation)

this way it will be possible to preserve foods.

if you also want to add a system where ingredients are added to foods to slow own their spoiling rate, add it as an additional nbt, something like a spoiling rate and use it as a multiplier on the time.
This way you can also add custom rate for preservation methods and it will be easy to edit and add custom preservation recipes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant