mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 08:14:27 +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
@@ -737,7 +737,7 @@ public class FlyPathFinder extends PathFinder
|
||||
{
|
||||
if (material == Material.water)
|
||||
{
|
||||
return drowningType == 1 ? PathNodeType.WATER : PathNodeType.OPEN;
|
||||
return ((EntityNPCInterface)this.theEntity).ai.canSwim ? PathNodeType.OPEN : PathNodeType.WATER;
|
||||
}
|
||||
else if (material == Material.lava)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user