Fix BlockDispenseEvent being called when nothing actually happens#8657
Closed
Machine-Maker wants to merge 2 commits into
Closed
Fix BlockDispenseEvent being called when nothing actually happens#8657Machine-Maker wants to merge 2 commits into
Machine-Maker wants to merge 2 commits into
Conversation
e8cf7ff to
ae03209
Compare
Member
Author
|
Rebased for 1.20.4 Something that probably needs to be worked out is when exactly BlockDispenseEvent should be fired for a "failed dispense". A lot of items fallback to just being spit out if their "special action" fails, like glowstone being dispensed but the block in front isn't a respawn anchor. In this situation, dispenser with glowstone inside pointing at a non-respawn anchor block, the glowstone will be spat out. But if the block in front is a full respawn anchor, the dispense will "fail", not spitting out glowstone or refilling the anchor. Does BlockDispenseEvent fire in that case? Nothing happened, nothing changed, no item ejected, nothing. Unsure. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The BlockDispenseEvent was incorrectly called in two specific situations, when bonemealing an invalid location, like a solid block or when trying to use flint & steel in an incorrect way. This doesn't match up with the rest of the calls of BlockDispenseEvent in which something always happens, and in other cases where something might happen, that logic is checked before calling the event.