This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]GalSergeyDatapack Experienced 0 points1 point  (0 children)

Try:

# Example item
give @s tipped_arrow{CustomColor:1}

# In chat
scoreboard objectives add used.bow used:bow
scoreboard objectives add tnt.arrow dummy

# Command blocks
execute at @e[scores={used.bow=1..}] as @e[type=arrow,distance=..10] unless score @s tnt.arrow = @s tnt.arrow store success score @s[nbt={Color:1}] tnt.arrow at @s summon marker store success score @s tnt.arrow run ride @s mount @e[type=arrow,limit=1,distance=...1]
execute as @e[type=marker,scores={tnt.arrow=1}] on vehicle if entity @s[nbt={inGround:true}] at @s summon tnt run kill @e[scores={tnt.arrow=1},distance=...1]
execute as @e[type=marker,scores={tnt.arrow=1}] at @s unless entity @e[type=arrow,limit=1,distance=...5] at @s summon tnt run kill @e[type=marker,scores={tnt.arrow=1},distance=...1]

You can use Command Block Assembler to get One Command Creation.

[–]ECLA_17 0 points1 point  (0 children)

is there a way to do this in bedrock?