| [lightblue_wool]电路全图[lightblue_wool]
 
  详情请下载存档自行观察
 
 
 [lightblue_wool]scoreboard 预备项目[lightblue_wool]
 angertest     dummy    用于探测和区分发怒的僵尸猪人
 chosen   dummy  用于辅助execute命令,标记绿宝石
 使用scoreboard指令设置好这些分数
 
 
 [purple_wool]核心思路[purple_wool]
 通过更改猪人的HurtBy标签,Anger标签
 和短暂的修改followRange的属性。实现
 消除愤怒(为什么这么复杂是因为1.8的新AI)
 Wiki上有明确的说明←当然是我写的
 当然中英文双板都是我写的233
 
 如果想要在1.8版本以后让一个僵尸猪人停止追踪玩家,你需要将猪人的下列nbt标签有所更改。1.HurtBy标签,你需要重写该标签,覆盖为一个其他实体的UUID.2.generic.followRange属性,
 竭尽可能的缩小它(随后你可以通过entitydata指令将其复原至正常值35.0) 3.Anger,将它调整
 为一个负数或者0.
To make a Zombie Pigman stop chasing players after 1.8, you may need to change nbttags below: 1.Hurtby, you need to rewrite this nbt tag to another entity's UUID.
 2.generic.followRange, shrink it as possible (you can turn it back by using command "entitydata").
 3.Anger, turn it into a negative number or 0.
详情参见这个wiki创作帖子
 其余类似【CBL·青皮】A2|自制大师球--命令方块教程系列
 
 
 
 [lightblue_wool]电路流程[lightblue_wool]
 
 [purple_dye]高频脉冲激活下面这条指令,用于标记场上绿宝石[purple_dye]
 
 [purple_dye]另起一组命令组,高频激活下面这条指令,后接比较器输出[purple_dye]复制代码scoreboard players set @e[type=Item] chosen 1 {Item:{id:"minecraft:emerald"}}
这样,场上的绿宝石周围一旦有僵尸猪人,就会以
 Anger标签为主,过滤掉为默认值0s的僵尸猪人
 
 后接比较器输出复制代码execute @e[type=Item,score_chosen_min=1,score_chosen=1] ~ ~ ~ testfor @e[r=30,type=PigZombie]
 复制代码scoreboard players set @e[type=PigZombie] angertest 1
[purple_dye]另起一组命令组,高频激活下面这条指令,后接比较器输出[purple_dye]复制代码scoreboard players set @e[type=PigZombie] angertest 0 {Anger:0s}
 ↑这段命令再容我三思,还有新的办法复制代码testfor @e[type=PigZombie,score_angertest_min=1]
[purple_dye]后接音效、粒子,后接核心命令[purple_dye]
 这段是让猪人停下来的必须的三个标签
 其中HurtBy后面需要跟一个UUID,我选的是
 null_UUID,感谢@siiftun1857
 
 复制代码execute @e[type=PigZombie,score_angertest_min=1] ~ ~ ~ playsound random.successful_hit @a ~ ~ ~ 1 1 0
复制代码entitydata @e[type=PigZombie] {Anger:0s,HurtBy:"00000000-0000-0000-0000-000000000000"}
复制代码execute @e[type=PigZombie,score_angertest_min=1] ~ ~ ~ kill @e[type=Item,r=5,score_chosen_min=1]
后面接几个延时,清空场上的score复制代码entitydata @e[type=PigZombie] {Attributes:[{Name:"generic.followRange",Base:0.0d,}]}
回复猪人的followRange为默认值35.0d
 
 复制代码scoreboard players reset @e[type=PigZombie]
其中留空的位置请参照我的复制代码entitydata @e[type=PigZombie] {Attributes:[,,,{Name:"generic.followRange",Base:35.0d,},,]}
【CBL·青皮君】B1|entitydata指令执行研究(未填坑)
 [purple_dye]系统完成[purple_dye]
 
 
 |