Add Throw EntityChangeBlockEvent for BrushableBlockEntity#brush#12133
Conversation
lynxplay
left a comment
There was a problem hiding this comment.
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. |
328a870 to
c614a20
Compare
|
769de10 might be a separate solution, not gonna push over yet because I am too tired. |
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.