I’m making a custom map in Minecraft Bedrock, and I’m having trouble setting up a block system with a tool. Here are the details
Block Name and Location
Block to break: Scaffolding
Coordinates: -10 -60 -3 (this is the fixed location where the player should break the block)Tool
Tool provided: Wooden Axe
Tool location: in a chest at -10 -59 3
Command used to give the axe:/replaceitem block -10 -59 3 slot.container 0 wooden_axe 1 0 {"minecraft:can_destroy":{"blocks":["scaffolding"]}}This part works: the player can pick up the axe and break the Scaffolding.
Problem Description
When the player breaks the Scaffolding with the axe, they can take the block.
But when they try to place it back on the ground, it duplicates in their hand.
I tried using command blocks to prevent duplication with tags and checking the block, but the problem still happens.Desired Behavior
The player should be able to:
Break the Scaffolding only with the axe.
Get only one block when breaking it.
Place the block anywhere without it duplicating.Commands Tried
Mcfunction/execute if block -10 -60 -3 air unless entity @p[tag=gotScaffolding] run give @p scaffolding 1 0 {"minecraft:can_destroy":{"blocks":["scaffolding"]}} /tag @p add gotScaffolding /execute unless entity @p[hasitem={item=scaffolding}] run tag @p remove gotScaffolding /gamerule doTileDrops false
I can also provide screenshots of the command blocks setup if needed.