How to use MobGoals API

Leopold95

New member
Jul 29, 2024
1
0
1
Hello all. I want to develop some custom AI behaviour with using default behaviours to. I know, I can remove all AI and set cusom, but i dont need only cuson behaviours, i want use some default.

So question is: how to add default AI Mob goals to the Paper MobGoals API. Thak you all.

If u give me an example ill be happy.
 

Noy

New member
Jan 8, 2023
18
1
0
1
Hello all. I want to develop some custom AI behaviour with using default behaviours to. I know, I can remove all AI and set cusom, but i dont need only cuson behaviours, i want use some default.

So question is: how to add default AI Mob goals to the Paper MobGoals API. Thak you all.

If u give me an example ill be happy.
I can't find any method to create a vanilla goal, so I'm sorry but maybe you should dig into NMS:

Java:
Bukkit.getMobGoals().addGoal(mob, 1, new PaperVanillaGoal<>(
    new PanicGoal(((CraftMob)mob).getHandle(), 1.5)
));