summon_equip.mcfunction 906 B

12345678910111213141516
  1. # 召唤有装备猪灵
  2. scoreboard players set $random_min mem 0
  3. scoreboard players set $random_max mem 4
  4. function lib:random
  5. execute if score $random mem matches 0 positioned 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
  6. execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
  7. execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
  8. execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
  9. execute as @e[type=piglin] run data merge entity @s {IsImmuneToZombification:1b,Tags:["mini_mob"]}
  10. # 提高追踪范围
  11. execute as @e[type=piglin] run attribute @s generic.follow_range base set 35
  12. # 关闭怪物间友伤
  13. team join white @e[tag=mini_mob]