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.
-Fixed pathfinder running into lava & water when it shouldn't.
FlyPathFinder:
-Simplified nodeTypeToOffset switch statement, removed unused function, and made air always return an open path node type.
EntityNPCInterface:
-Fixed "In Air" drowning type. Breathes underwater now.
EntityNPCFlying:
-Fixed NPCs still using flight movement when not being able to breathe.
ICustomNpc:
-Added canBreathe() function
-- Renamed Files to for more universal names
- Refactored Function Inputs
PathNavigateFlying
---- REMOVED pathCooldown/maxCooldown
+ Added updatePath() to calculate IF the current PATH is making progress and IF not should update. If distance to target is SHORTENING, no additional calculation needed
+ Improved getPathToXYZ -- if Current Path was REMOVED during updatePath then find a new path
+ Improved getPathToEntityLiving-- if Current Path was REMOVED during updatePath then find a new path
+ Added tryUpdatePath as a manual/timed update if Navigation is OLD
+ Added CHECKforSTUCK function to correct if NPC gets stuck WHILE pathing (Fixes more issues) -- There is a new Timeout Variable that if the NPC gets stuck for TOO long that PATHING should be removed and reattemped. If reattempted multiple times the NPC will TIMEOUT timer will continue to increase in threshold to severely reduce lag
+ Upgraded isDirectPathBetweenPoints from 1.12 better calculation method
FlyPathFinder
+ Added getPathPriority() to getStart() for lag reduction
+ Added PATH break; if infinite loop is created during addToPath
+ Added distanceManhattan and costMalus to distanceToNext calculation to calculate better SHORTEST path to TARGET
+ Added CostMalus calculation into findPathOptions (Less Calculations Needed)
+ Added NPCPathPoint Cost Usage
NPCPath
+ getCurrentPos() -- Returns current VEC3 of Index and Path
-- Renamed from FlyPathEntity
NPCPathPoint
+ DistanceFromOrigin to keep track of distance calculated from origin
+ Added Cost to keep track of CostMalus + Manhattan Calculation
-- Renamed from FlyPathPoint
PathHeap
-- Renamed from FlyPath
Flying NPCs:
-Pathfinding has a cooldown to decrease the amount of times they create a new path.
-Fly height limit implemented using getTopSolidOrLiquidBlock instead of iterating through blocks below the NPC.
PathNavigateFlying:
Flight pathing checks if it's stuck every 10 ticks now, and clears the path to be able to path again if so.
FlyPathFinder:
If a point on the path is air, the path finder checks if the NPC will run into any blocks above that point due to its height.
-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
Flying NPC's get knocked back properly, and their vertical speed has been increased.
Flying NPC's vertical flying speed can be changed by npc.setFlySpeed(double speed) from ScriptNpc.
Added a ton of code regarding Flying doesn't work correctly. Please Uncomment them by searching for
Comment: // Fly Change
Fixed Hidden Parts not Saving