Remove specific PathfinderGoals from NMS Entity 1.16

Discussion in 'Spigot Help' started by LocoMania33, Nov 22, 2020.

  1. As stated in the title of the thread, I created a custom entity using NMS and also added a few custom PathfinderGoals overwriting the original ones, but now I want to remove some of those PathfinderGoals, but not every single one. I have been searching but I don't find a way to do it (Or at least I don't undestand them), here is some of my code for applying the pathfindergoals I want to remove:

    Code (Java):
    EntityCreature craftEntity = ((CraftCreature) event.getEntity()).getHandle();
    craftEntity.goalSelector.a(4, new PathfinderGoalFollow((EntityInsentient) craftEntity, 1.5, 15,
                                    (EntityLiving) ((CraftPlayer) event.getPlayer()).getHandle()));
    I hope you can help me out :D