[lightblue_wool]电路全图[lightblue_wool]
详情请下载存档自行观察
[lightblue_wool]scoreboard 预备项目[lightblue_wool]
system dummy 探测玩家是否开启系统
chosen dummy 探测空的大师球
chosen2 dummy 探测满的大师球
filter dummy 将物品与生物区分开
cbkeeping dummy 探测玩家是否使用过空的大师球
使用scoreboard指令设置好这些分数
[purple_wool]核心思路[purple_wool]
利用execute与tp指令的组合
传送大师球周围的非玩家实体
或者将他们传送到大师球旁边
[lightblue_wool]电路流程[lightblue_wool]
[purple_dye]利用下列代码高频标记非物品单位[purple_dye]
- scoreboard players set @e[type=!Item] filter 1
复制代码 [purple_dye]一旦system为1,高频探测场上的[purple_dye]
空大师球,同时加chosen分数
- scoreboard players set @e[type=Item] chosen 1 {Item:{id:"minecraft:spawn_egg",Damage:0s,tag:{ench:[{id:51,lvl:10}],display:{Name:"MasterBall-Empty",Lore:["Throw it out","to capture mobs"]}}}}
复制代码 [purple_dye]一旦成功执行,播放粒子特效和声音(略)[purple_dye]
同时传送周围filter为1的单位到上图所示
的由barrier方块组成的4x4x4区域内
也就是不是物品的单位。最后调整玩家
cbkeeping分数值为true
- execute @e[score_chosen_min=1] ~ ~ ~ tp @e[type=!Player,r=5,score_filter_min=1] 笼子坐标x 笼子坐标y
- 笼子坐标z
复制代码- scoreboard players set @a cbkeeping 1
复制代码 [purple_dye]高频激活下列代码,探测玩家是否捡起[purple_dye]
遗落在地上的空大师球。一旦输出刷没
空大师球后接替换指令为满大师球
- /clear @a[score_cbkeeping_min=1] minecraft:spawn_egg 0 1 {ench:[{id:51,lvl:10}],display:{Name:"MasterBall-Empty",Lore:["Throw it out","to capture mobs"]}}
复制代码- /give @a minecraft:spawn_egg 1 0 {ench:[{id:51,lvl:10}],display:{Name:"MasterBall-Captured",Lore:["Throw it out","to release mobs"]}}
复制代码 [purple_dye]利用与探测空大师球类似的方法探测[purple_dye]
场上的满大师球。一旦发现后接粒子音效(略)
并执行反传送命令从barrier传送回满大师球
?=笼子内坐标
- tp @e[type=!Player,x=?,y=?,z=?,r=4] @e[type=Item,score_chosen2_min=1]
复制代码 [purple_dye]后同时清除场上item满大师球和玩家背包内的[purple_dye]
满大师球,接清楚cbkeeping分数的指令。系统完成
(此时场上大师球仍保有chosen2分数,以此消除)
- /clear @a minecraft:spawn_egg 0 1 {ench:[{id:51,lvl:10}],display:{Name:"MasterBall-Captured",Lore:["Throw it out","to release mobs"]}}
复制代码- /kill @e[type=Item,score_chosen2_min=1]
复制代码- scoreboard players set @a cbkeeping 0
复制代码
|