-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add Throw EntityChangeBlockEvent for BrushableBlockEntity#brush #12133
base: main
Are you sure you want to change the base?
Conversation
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.
The event calls are too late right now.
Right now, the block would drop its content even if people cancelled the change event.
It would also unpack its loottable, which, that modifies the block.
We need to move the unpacking down, dropContent calls it so, I think we can just move it right before the block set when a completion state changed (needs testing).
But yea, cancelling these events should maintain the block in the same state (not drop items/unpack loot tables).
Mhmmm, I did not even think about the brushCount, good catch. Event is still not fully cancelling the "last" and final brush tho, the game event is still called and the brushCount is not reset either. |
...erver/patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.java.patch
Outdated
Show resolved
Hide resolved
328a870
to
c614a20
Compare
769de10 might be a separate solution, not gonna push over yet because I am too tired. |
c614a20
to
769de10
Compare
769de10
to
86138f6
Compare
This Pull Request adds calls for EntityChangeBlockEvent for BrushableBlockEntities. This allows for the increased tracking described in #12132.
This warrants further testing due to the fact that the point where the loot table is unpacked at could cause issues, however, I was unable to notice anything significant during my testing. Input for this aspect is appreciated.