我希望检测背包里指定物品的数量并且赋予在记分版上
我知道可以通过
execute as hairdry_customer store result score @s psj run data get entity @s Inventory[0].Count 来检测第一格的
请问如果不确定物品在哪一格应该怎么填写后面的data
例如我想检测{id:"stone",tag:{Tags:["123"]}}的数量并且赋予到本体的记分版psj上 请问该怎么写
我知道可以通过
execute as hairdry_customer store result score @s psj run data get entity @s Inventory[0].Count 来检测第一格的
请问如果不确定物品在哪一格应该怎么填写后面的data
例如我想检测{id:"stone",tag:{Tags:["123"]}}的数量并且赋予到本体的记分版psj上 请问该怎么写
【弹药消耗 - clear指令与execute store的使用方法【MC命令教学】-哔哩哔哩】https://b23.tv/ftR2uw
看看这个视频,里面就详细讲了/clear和/execute store来检查背包物品的方法
看看这个视频,里面就详细讲了/clear和/execute store来检查背包物品的方法
本帖最后由 luobojun123 于 2021-11-5 13:13 编辑
将索引值变为具体对象即可:execute as hairdry_customer store result score @s psj run data get entity @s Inventory[{id:"stone",tag:{Tags:["123"]}}].Count
将索引值变为具体对象即可:execute as hairdry_customer store result score @s psj run data get entity @s Inventory[{id:"stone",tag:{Tags:["123"]}}].Count
luobojun123 发表于 2021-11-5 07:46
将索引值变为具体对象即可:execute as hairdry_customer store result score @s psj run data get entity ...
请问如果检测药水等级是不是也是这样类似的写法
ActiveEffects:[{Id:19b}].level
这样子呢
吹风机客户 发表于 2021-11-5 13:16
请问如果检测药水等级是不是也是这样类似的写法
ActiveEffects:[{Id:19b}].level
这样子呢 ...
遇到这种不确定的问题建议直接打开游戏尝试一下。如果是一个比较复杂的系统的话可以暂时忽略这些小细节,等有时间再来试验。
将索引值变为具体对象即可:execute as hairdry_customer store result score @s psj run data get entity @s Inventory[{id:"stone",tag:{Tags:["123"]}}].Count