-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix NPE when non-BlockEntity calls AbstractFurnaceBlockEntity#craftRecipe
#339
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OroArmor
requested changes
Aug 24, 2023
...item_setting/src/main/java/org/quiltmc/qsl/item/setting/api/RecipeRemainderLogicHandler.java
Outdated
Show resolved
Hide resolved
...ava/org/quiltmc/qsl/item/setting/mixin/recipe_remainder/AbstractFurnaceBlockEntityMixin.java
Outdated
Show resolved
Hide resolved
EnnuiL
suggested changes
Aug 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address oro's review and i'll consider it approved
EnnuiL
added
library: item
Related to the item library.
t: refactor
This proposes a refactor.
t: new api
This adds a new API.
s: waiting for test
This pull request is waiting to be tested, the PR cannot be put in FCP until it has been tested.
labels
Aug 25, 2023
OroArmor
approved these changes
Aug 28, 2023
EnnuiL
approved these changes
Aug 29, 2023
EnnuiL
changed the title
Fix NPE when non-BlockEntity calls AbstractFurnaceBlockEntity#craftRecipe
Fix NPE when non-BlockEntity calls Sep 2, 2023
AbstractFurnaceBlockEntity#craftRecipe
This PR has entered a Final Comment Period of 5 days on August 31st, with 3 days remaining now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
final-comment-period
library: item
Related to the item library.
s: waiting for test
This pull request is waiting to be tested, the PR cannot be put in FCP until it has been tested.
t: new api
This adds a new API.
t: refactor
This proposes a refactor.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If smelting is performed from a non-in-world "furnace" (e.g. portable furnace from PortableTables), the ThreadLocal used for remainder item overflow dropping may be null, or may correspond to the location of a different in-world furnace.
The getting of the BE from the ThreadLocal has been moved so it happens during the actual dropping of the items, to prevent accessing the ThreadLocal when items don't need dropping.
Since the position is not needed if there are no overflowing remainder items, the recipe output mixin will check if there is no BE performing the smelting and if there would be a remainder that cannot fit, and in that situation, prevents the output from accepting more items.
Draft because not sure if the additional API method is desirable or not.