fz-survival-datapack/data/fz/functions/noai/main.mcfunction
2019-12-30 16:34:27 +08:00

10 lines
1.3 KiB
Mcfunction

execute if data storage minecraft:cod {ai:0b} as @e[type=minecraft:cod,nbt={}] run data modify entity @s NoAI set value 1b
execute if data storage minecraft:salmon {ai:0b} as @e[type=minecraft:salmon,nbt={}] run data modify entity @s NoAI set value 1b
execute if data storage minecraft:tropical_fish {ai:0b} as @e[type=minecraft:tropical_fish,nbt={}] run data modify entity @s NoAI set value 1b
execute if data storage minecraft:pufferfish {ai:0b} as @e[type=minecraft:pufferfish,nbt={}] run data modify entity @s NoAI set value 1b
execute if data storage minecraft:bat {ai:0b} as @e[type=minecraft:bat,nbt={}] run data modify entity @s NoAI set value 1b
execute if data storage minecraft:cod {ai:1b} as @e[type=minecraft:cod,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b
execute if data storage minecraft:salmon {ai:1b} as @e[type=minecraft:salmon,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b
execute if data storage minecraft:tropical_fish {ai:1b} as @e[type=minecraft:tropical_fish,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b
execute if data storage minecraft:pufferfish {ai:1b} as @e[type=minecraft:pufferfish,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b
execute if data storage minecraft:bat {ai:1b} as @e[type=minecraft:bat,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b