Block definitions can use custom components with the onBreak hook to signal to scripts when that block is destroyed. This destruction works in nearly all cases. It does not signal when a block is destroyed due to its minecraft:placement_filter conditions no longer being met.
Demonstration
The attached video demonstrates this issue. When destroying the block by hand, Broken! is emitted to the content log, indicating the scripting hook received the event. When destroying the required supporting block (defined as cobblestone in the block definition), the custom block is destroyed, but no event is received by scripting.
Reproduction
This example is taken from the behavior pack in the attached world for convenience. This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such. Ensure content logs are enabled with at least warn level to see the demo.
Attachments
Comments 3
This issue has been reviewed by our team.
Please add new, relevant information if it helps us understand or reproduce the issue. To show that you’re affected, use the vote feature rather than commenting.
If a fix is implemented, it will be listed in our official changelogs.
For major outages or urgent assistance, visit the Minecraft Help Center.
Thank you for helping us improve Minecraft! We saved your files: