@Override public void initTargetTasks(LivingEntityNPC entity, AIManager fightAIManager) { CraftAIManager cmanager = (CraftAIManager) fightAIManager; EntityCreature handle = ((CraftCreature) entity).getHandle(); cmanager.addTask(0, new PathfinderGoalHurtByTarget(handle, true, new Class[0])); // cmanager.addTask(1, new PathfinderGoalNearestAttackableTarget(handle, EntityHumanNPC.class, // true)); cmanager.addTask(1, new SearchGoalTargetTask(entity, LivingEntityNPC.class)); // cmanager.addTask(1, new PathfinderGoalNearestAttackableTarget<EntityMonster>(handle, // EntityMonster.class, true)); }
@Override public void initGoalTasks(LivingEntityNPC entity, AIManager manager) { CraftAIManager cmanager = (CraftAIManager) manager; EntityCreature handle = ((CraftCreature) entity).getHandle(); // cmanager.addTask(2, new PathfinderGoalMeleeAttack(handle, EntityHuman.class, 1.0D, false)); cmanager.addTask(0, new PathfinderGoalFloat(handle)); cmanager.addTask(1, new UniversalAttackOtherNPCsTask(entity, "dev_attacker", 3, 10)); cmanager.addTask( 2, new PathfinderGoalMeleeAttack(handle, EntityMonster.class, entity.getWalkSpeed(), false)); // cmanager.addTask(1, new MovePlayerTask(entity)); cmanager.addTask(2, new PathfinderGoalMoveIndoors(handle)); cmanager.addTask(3, new PathfinderGoalRestrictOpenDoor(handle)); cmanager.addTask(4, new PathfinderGoalOpenDoor(handle, true)); cmanager.addTask(5, new PathfinderGoalMoveTowardsRestriction(handle, 1.0D)); cmanager.addTask(7, new PathfinderGoalRandomStroll(handle, 1.0D)); cmanager.addTask(8, new PathfinderGoalLookAtPlayer(handle, EntityCreature.class, 8.0F)); cmanager.addTask(8, new PathfinderGoalRandomLookaround(handle)); }