Started by
Spidey0042
on
Topic category: Help with Minecraft modding (Java Edition)
how do I get a tame mob to start and stop attacking when I right-click on it? I tried to do it myself but as it is my first mod all my attempts ended up crashing the game :/
There is no way to add additional data to mob AI (and create advanced AI with more than one lines of behavior), so the only way - create a copy of mob with another AI and create procedure that will despawn agressive (attacking) mob and replace it with his peaceful version, and call it than right click on mob.
Look this for more info: https://www.youtube.com/watch?v=8bXr9Y9G5HM