How to give a mob a custom AI?

How can I give a mob a custom AI by using commands? Like giving a giant the AI of a zombie, for example.

1

2 Answers

As of 1.9, if a mob is riding another mob, the passenger will take over pathfinding of the host. The following summons a giant that has the pathfinding of a zombie.

/summon Giant ~ ~1 ~ {Passengers:[{id:"Zombie"}]}

However, this only affects pathfinding; the giant will still not attack, though you could use smoke and mirrors to accomplish that such as running a /effect command around the giant to target players.

You can't, there is no NBT tag/data for it. See also

You Might Also Like