Skip to content

Invalidate cache itemstack and state after failed recipe completion#14

Merged
Exaxxion merged 1 commit intomasterfrom
compressor
Aug 3, 2021
Merged

Invalidate cache itemstack and state after failed recipe completion#14
Exaxxion merged 1 commit intomasterfrom
compressor

Conversation

@ALongStringOfNumbers
Copy link
Copy Markdown
Member

A couple changes related to #7

First, delay the recipe lookup until after there is confirmed to be a non-null item. Previously the recipe lookup would run before a guaranteed item was found, which means that recipe would always be null, even if the input check found an applicable item.

This change defers the recipe lookup to after finding an item, so that recipe will not be null (for an input item) after the new input item is set.

Secondly, if the input consumption failed due to null recipe or other factor, reset the cached itemstack and the mark state. This part is what addresses the issue in #7.

Fixes #7

Copy link
Copy Markdown

@Exaxxion Exaxxion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look fine, having some weird issues with the runClient target in my local dev environment so would appreciate if someone can also verify the changes in game.

@Exaxxion Exaxxion requested a review from eutro August 1, 2021 23:43
@ferreiraalex
Copy link
Copy Markdown

i can? release?

Copy link
Copy Markdown

@Exaxxion Exaxxion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to fix the issue nicely. I had to make some changes to the build to fix my aforementioned runtime crash to finish reviewing, so we should merge #15 then this issue and we should be good.

@Exaxxion Exaxxion merged commit fcabe0e into master Aug 3, 2021
@Exaxxion Exaxxion deleted the compressor branch August 3, 2021 00:26
NotMyWing pushed a commit that referenced this pull request Jun 3, 2023
Co-authored-by: DStrand1 <DStrand1@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

Quantum Compressor doesn't work sometimes unless broken & replaced

3 participants