mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 12:19:59 +00:00
Pathing improvements.
EntityAIReturn: -Fixed NPC still creating a new path when close to the NPC's home. EntityNPCInterface: -Fixed flying NPCs having their home Y position dip into the ground. -NPCs update their move helpers and navigators when they can't breathe. FlyingMoveHelper: -Reduced calls to Math.atan2 (very expensive operation to be unnecessarily calling every tick) FlyPathFinder: -Water opens an OPEN path point iff the NPC can swim, not iff the NPC's drowning type != 1. NPCPath: -Made PathPoint occurrences use NPCPathPoint PathNavigateFlying: -A slightly larger area of blocks with respect to width is checked om rayTraceBlocks(), and the function now also correctly checks for liquids.
This commit is contained in:
1 parent
e1c9b69335
commit
51b412a0bf
6 files changed
+47
-32
No files matched your search
@@ -51,9 +51,8 @@ public class FlyingMoveHelper extends EntityMoveHelper{
|
||||
}
|
||||
|
||||
this.entity.velocityChanged = true;
|
||||
this.entity.rotationYaw = this.limitAngle(this.entity.rotationYaw,(float) ((Math.atan2(-d0, -d2) + Math.PI) * -(180F / Math.PI)),20.0F);
|
||||
}
|
||||
|
||||
this.entity.rotationYaw = this.limitAngle(this.entity.rotationYaw,(float) ((Math.atan2(-d0, -d2) + Math.PI) * -(180F / Math.PI)),20.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user