0

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

  1. Block Name and Location
    Block to break: Scaffolding
    Coordinates: -10 -60 -3 (this is the fixed location where the player should break the block)

  2. 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.

  3. 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.

  4. 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.

  5. 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.

New contributor
توب ستيشين is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.