Extra Hard Mode

Extra Hard Mode

63.1k Downloads

Feature Request: Food Spoilage

I3ladeDragon opened this issue · 5 comments

commented

Basically allow inventory and chest foods to spoil over a period of time.

Example:

  • Raw Chicken turns into Rotten Flesh after 6 IRL hours.
  • Cooked Chicken turns into Rotten Flesh after 72 IRL hours.
commented

I like this. Is it feasible?

commented

Not really feasible unless we monitor chests. Depending on implementation, this may cause chunk loads, which are crazy expensive in 1.16 given the issues I've been receiving on chunk load operations. Lastly, this could kinda be a feature left to extra expansion to really make good use. E.g., how about putting ice to preserve food, and make it melt after some time?

Patrons (which I may make a tier for, as I think about this) may request features to be of higher priority.

commented

Either way, biggest issue is this introduces a new concept (time-based actions) that would have to be defined (does time occur only while player is logged in? Chunk loaded? All the time?) and then explained to players, so this would take significant work to create.

commented

I didn't really think deeply about how this would be implemented when I made this suggestion, but I do like the idea of expanding upon the idea to use ice to help preserve food!

Since you cannot keep every chest loaded without destroying performance, it should probably only run inside of currently loaded chunks and "pause" when the chunk is no longer loaded.

Nifty idea, for sure, but I can see where implementation could be a different story.

EDIT: I think if you wanted it to constantly run, even for chests in unloaded chunks, you would need SQL database support... I don't develop plugins, but that seems like it would be what it would take to have all chests run spoilage regardless of player activity on a server.

commented

I think if you wanted it to constantly run, even for chests in unloaded chunks, you would need SQL database support

Yes, would need persistence (doesn't have to be SQL but that is one form of persistence) and would also need a way to ID those individual items.

But using gherkin statements would help break up this feature into implementable chunks if you want to pursue. https://content.pivotal.io/blog/how-to-write-well-formed-user-stories Idk how much time I'll have but this project does attract PRs time to time.