I'm creating a behavior pack and I need to detect the ID of a block placed by a player. The player_placed_block event doesn't give me an ID with the event data, it only gives me a three-dimensional coordinate of where the block was placed, and which player placed it:

Player placed block documentation.

There's also a getBlock method, which would work great with the coordinates I get back from the player_plaed_block event; however, it requires a ticking area:

Get block documentation.

The problem with getBlock is that I can't find anything in the documentation for getting the ticking area of the player, and the only thing I could find on the web was a ticket for code that didn't work, and seemed to require the tickingarea command to be ran in game first, which defeats the purpose of my script.

Is there a way to not only know the position and player, but also the type of block placed?


I assume this is from the community-ran bedrock(dawt)dev website? I recommend checking their Wiki / Guides which is also updated by the community.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.