[lightblue_wool]电路全图[lightblue_wool]
[lightblue_wool]scoreboard 预备项目[lightblue_wool]
toolsuse stat.useItem.minecraft.golden_pickaxe 探测玩家是否使用了金镐
durability dummy 表达剩余的耐久度
使用scoreboard指令设置好这些分数
[purple_wool]核心思路[purple_wool]
玩家一旦使用史诗金镐,进行
一次替换。清空金镐并重新发放一个
相同的镐子。同时对记分版进行计算。
[lightblue_wool]电路流程[lightblue_wool]
[purple_dye]利用testfor检查玩家是否使用镐子[purple_dye]
- /testfor @a[score_toolsuse_min=1]
复制代码 [purple_dye]输出后用setblock指令使下列指令高频激活[purple_dye]
探测玩家使用的是普通的金镐还是史诗金镐
此命令后后续命令接9列,★代替数字1到9
- /scoreboard players remove @a durability 1 {SelectedItemSlot:<b>★</b>,Inventory:[{Slot:★b,id:"minecraft:golden_pickaxe",Damage:1s,tag:{CanDestroy:["minecraft:stone","minecraft:iron_ore"],display:{Name:"EpicPickaxe"}}}]}
复制代码 [purple_dye]输出后接下列指令请注意[purple_dye]
顺序,自上而下=从前往后
分别是执行了一次清除指令和
一次重新装备指令。同时激活了
玩家是否耗尽耐久度durabilityscore的判定
- /clear @a minecraft:golden_pickaxe 1 100 {CanDestroy:["minecraft:stone","minecraft:iron_ore"],display:{Name:"EpicPickaxe"}}
复制代码- /replaceitem entity @a slot.hotbar.0 minecraft:golden_pickaxe 1 0 {CanDestroy:["minecraft:stone","minecraft:iron_ore"],display:{Name:"EpicPickaxe"}}
复制代码- /clear @a[score_durability=0,score_durability_min=-100] minecraft:golden_pickaxe 0 1 {CanDestroy:["minecraft:stone","minecraft:iron_ore"],display:{Name:"EpicPickaxe"}}
复制代码- /scoreboard players set @a toolsuse 0
复制代码- /scoreboard players reset @a[score_durability=0,score_durability_min=-100]
复制代码
[purple_dye]Debug部分探测玩家是否有使用2次[purple_dye]
或者3次的金镐,如果有执行清空
并且返回一个好的镐子。
下列指令高频脉冲激活
- clear @a minecraft:golden_pickaxe 2 100 {CanDestroy:["minecraft:stone","minecraft:iron_ore"],display:{Name:"EpicPickaxe"}}
复制代码 和
- clear @a minecraft:golden_pickaxe 3 100 {CanDestroy:["minecraft:stone","minecraft:iron_ore"],display:{Name:"EpicPickaxe"}}
复制代码 [purple_dye]后面都接比较器,输出后执行下列指令[purple_dye]
其中★,若连接上方第一条指令则为1
若连接第二条指令则为2
- /replaceitem entity @a slot.hotbar.0 minecraft:golden_pickaxe 1 0 {CanDestroy:["minecraft:stone","minecraft:iron_ore"],display:{Name:"EpicPickaxe"}}
复制代码- /scoreboard players remove @a durability ★
复制代码 系统完成
|