tags - 如果玩家有带有特定标签的弓,则执行命令
问题描述
我有这些命令,并且我希望它仅在玩家拥有带有“爆炸”标签的弓时才爆炸箭头。
以下是命令(由 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/但我不知道该放在哪里。有什么帮助吗?我不得不提出这个问题
解决方案
尝试执行为 @a[nbt={SelectedItem:{id=“bow”,tag:{explode:1b}}}] 运行打个招呼
为了给自己鞠躬,请给@s bow {explode:1b}
推荐阅读
- c# - 使用 MvvmCross 6.0 在 Xamarin.Android 中实施 Google Pay
- amazon-web-services - 将 Base64 字节传递给 AWS Rekognition 比较人脸
- php - 我无法从 codeigniter 向 chartjs 添加数据
- javascript - 在对象数组中查找包含对象数组中的子项的值
- r - ROracle 安装 - 无法加载共享对象 ROracle.dll
- mysql - 查询 MYSQL 中单列中所有值匹配的项目
- javascript - 单击提交按钮时如何启用复选框
- bash - 如何使用 bash/sh shell 从容器内部终止容器进程(PID 1)
- spring-boot - 查找 spring @Transactional 的事务 id
- c# - 如何通过 Slack API 检索和使用“trigger_id”?