Theurgy

Theurgy

15M Downloads

Digestion Vat and Fermentation vat exploit with create mod contraptions

weyermg opened this issue ยท 1 comments

commented

Describe the bug
When a valid recipe is placed inside a digestion vat or fermentation vat, and the block is moved as part of a create mod contraption, then when the contraption is still again and the vat is closed, the recipe inside instantly completes. This bug does not happen if the recipe is changed after the contraption is still again. For example, put only sal ammoniac in the digestion vat and then move it. When the vat is still again, but rare metal niter in the vat and close it. The recipe proceeds as normal.

To Reproduce
Steps to reproduce the behavior:

  1. Put a valid recipe inside a digestion vat or fermentation vat.
  2. Move the vat as part of a create contraption.
  3. When the contraption is still again, close the vat to start the recipe
  4. The recipe immediately completes.

Expected behavior
It is expected that even after the vat is still again, closing the vat will cause the recipe to start from the beginning with the expected 50 second timer.

Screenshots
Here's a video of the problem https://www.youtube.com/watch?v=7cssEuqyOkI

System (please complete the following information):

Additional context
I think the problem might be caused by the fact that a contraption stopping creates a new instance of a vat block but with the items inside. Therefore, the progress variable has not been set even though the recipe is valid and inside the block. Therefore, when the recipe starts with the unset progress variable still present, a comparison that shouldn't pass passes and the recipe immediately completes.

commented

btw i was wrong about it forgetting its current progress. The block actually just forgets how much time is left in the current recipe so it defaults to zero. When you close the vat it immediately completes with a time of zero and then acts normally afterwards. Probably just need a check for invalid recipe times (e.g. 0) when the block tries to tick its crafting behavior