MicrosoftDocs / minecraft-creator

This is the repository for Minecraft Bedrock documentation.
Creative Commons Attribution 4.0 International
179 stars 131 forks source link

playerBreakBlock event #890

Open FBQingYi opened 2 months ago

FBQingYi commented 2 months ago

[Enter feedback here] In the playerBreakBlock event, the content obtained from event.block.typeId represents the block after destruction, which is usually air. However, I wish to obtain the ID of the block that was actually destroyed, such as dirt.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

lxhzzy06 commented 2 months ago

可以用event.brokenBlockPermutation.type.id获取被破坏方块的id,之前几个版本的文档写明了block是空气方块