首页 > 解决方案 > 如果玩家有带有特定标签的弓,则执行命令

问题描述

我有这些命令,并且我希望它仅在玩家拥有带有“爆炸”标签的弓时才爆炸箭头。

以下是命令(由 AntVenom 提供)

"*" Means that all blocks under it have that property

[Repeat,*Unconditional,*Always Active]
/execute at @e[type=Arrow] ~ ~ ~ run /scoreboard players set @e[c=1,r=0,type=Arrow] inGround 1 {inGround:1b}
[*Chain]
/execute at @e[type=Arrow] ~ ~ ~ run /particle lava ~ ~ ~ .5 .5 .5 .5 30 .5

/execute at @e[type=Arrow,score_inGround_min=1] ~ ~ ~ run /summon PrimedTnt ~ ~1 ~ {Fuse:0}

/kill @e[type=Arrow,score_inGround_min=1]

我可以使用https://mcstacker.net/但我不知道该放在哪里。有什么帮助吗?我不得不提出这个问题

标签: tagscommandminecraftexecute

解决方案


尝试执行为 @a[nbt={SelectedItem:{id=“bow”,tag:{explode:1b}}}] 运行打个招呼

为了给自己鞠躬,请给@s bow {explode:1b}


推荐阅读