Changes to NPC flight:

-Improved flight pathing greatly, MUCH MUCH smoother now.
-The "flying speed" of an NPC now correctly speeds up how fast the NPC climbs vertically while flying
-NPCs now properly return to start while flying
This commit is contained in:
Luis C.M committed 2022-05-04 03:06:40 -05:00
1 parent bfd872a239
commit 85a1892c71
4 files changed
+20 -150

No files matched your search

@@ -232,7 +232,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
public int getMaxSafePointTries()
{
return 5;
return 10;
}
@Override
@@ -426,13 +426,13 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
protected void updateAITasks()
{
this.getNavigator().onUpdateNavigation();
this.getMoveHelper().onUpdateMoveHelper();
try {
super.updateAITasks();
} catch (ConcurrentModificationException ignored){
}
this.getNavigator().onUpdateNavigation();
this.getMoveHelper().onUpdateMoveHelper();
}
public void addInteract(EntityLivingBase entity){
@@ -631,7 +631,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
if (canFly()) {
this.getNavigator().setCanSwim(true);
this.tasks.addTask(0, new EntityAISwimming(this));
} else {
this.tasks.addTask(0, new EntityAIWaterNav(this));
}