Barrels do not use `ICalendarTickable` to protect against time spent unloaded, resulting in recipes and ingredients rotting out of expected order
Grigoriewich opened this issue · 3 comments
Describe the bug
I wanted to make vinegar
I made corn whiskey
Waited for ripening apples
Gathered fresh apples and put them in whiskey
I sealed the barrels, left the game and went to work
In the evening I came home from work, entered the game and saw that three months had passed
In the barrels, apples simply rotted, and vinegar was not produced.
This was not before when I was in a vinegar production game.
Let me remind you Apples were fresh.
Meta Info
@eerussianguy In theory yes, using /timetfc
.
However this looks like a pretty expected situation: the barrel loads, and checks it's recipe, which is invalid (as the ingredient has rotted since). This:
Vinegar is not made when the chunk is not loaded
is kind of a "no shit sherlock", nothing can happen while a chunk is unloaded. We just try and fake it with time tracking.
If we were to solve this, I believe TEBarrel
needs to properly implement ICalendarTickable
and delegate recipe checks during aforementioned updates to CalendarTFC#runTransaction
. However that's potentially a big pile of "simulate everything which has occurred since load".
We do this so some extent (for example, the charcoal forge will consume fuel, but will not actually heat), because it's physically impossible for us to identically simulate what would've occurred. So we have to make compromises where possible in order to be able to efficiently post-load update a TE without causing massive lag spikes.
I have no right to use such commands. This happened on a test server. I can not influence the time. Some products at this time deteriorated by expiration date. Animals grew, the crop in the garden froze. And that’s all right. But apples in alcohol have deteriorated, and this is not right.