怎么用命令方块让特定的装备有药水效果
rpgitem /rpgitem 测试 power consume 设置为消耗品,使用后消耗掉 /rpgitem 测试 power potionself 20 20 0 slow 添加迟缓。冷却一秒 持续一秒 等级一级 /rpgitem 测试 power potionself 20 20 0 confusion 反胃,同理修改最后一个单词为效果即可
首先,获得装备/give 你的名字 minecraft:iron_chestplate 1 0 {display:{Name:"任意取的名字"}}
然后,再用命令方块,输入/testfor @a {Inventory:[{Slot:102b,id:minecraft:iron_chestplate,Damage:0s,Count:1b,tag:{display:{Name:"任意取的名字"}}}]},高频启动。
后方摆红石比较器,接命令方块/effect @a 效果id 时间 等级 (去查https://zhidao.baidu.com/question/1047037042389575739.html)
教程用于1.8以上版本,多人游戏会有bug
然后,再用命令方块,输入/testfor @a {Inventory:[{Slot:102b,id:minecraft:iron_chestplate,Damage:0s,Count:1b,tag:{display:{Name:"任意取的名字"}}}]},高频启动。
后方摆红石比较器,接命令方块/effect @a 效果id 时间 等级 (去查https://zhidao.baidu.com/question/1047037042389575739.html)
教程用于1.8以上版本,多人游戏会有bug