Commit Graph
60 Commits
Author SHA1 Message Date
Luis C.M 4674f59ae1 Fly pathing size compatibility fix 2022-11-07 14:28:41 -06:00
KAMKEEL eb9efce68c Update PathNavigateFlying.java 2022-11-07 15:08:39 -05:00
KAMKEEL 73938d20ab Merge branch 'dev' of https://github.com/KAMKEEL/CustomNPC-Plus into dev 2022-11-07 14:48:54 -05:00
KAMKEEL cd91636993 Update AIMoveSpeed for CheckStuck 2022-11-07 14:48:47 -05:00
Luis C.M 219d0f1802 Fixed strange flight behavior in flying NPCs with sizes below 5. 2022-11-07 13:32:31 -06:00
Luis C.M a1eb8ff91b Fixed odd NPC bobbing and NPCs with fly height limits not being able to path 2022-11-07 13:01:57 -06:00
Luis C.M cc42f1f141 PathNavigateFlying:
-Flying fix. :)
2022-11-07 06:46:38 -06:00
KAMKEEL cdebcc352c Correct PathNodeType 2022-11-07 03:16:05 -05:00
KAMKEEL bfb446b0de Move Helper Public 2022-11-07 01:40:24 -05:00
KAMKEEL 33d7b73cb1 Fix Fly Remote Reset 2022-11-07 01:39:47 -05:00
KAMKEEL 291065024a Revert "Revert "CostMalus != 0 :D""
This reverts commit 8aef214c88.
2022-11-07 01:08:53 -05:00
KAMKEEL 8aef214c88 Revert "CostMalus != 0 :D"
This reverts commit f564a388ad.
2022-11-07 00:57:14 -05:00
KAMKEEL b223381c29 Remove Cooldown 2022-11-07 00:56:12 -05:00
KAMKEEL 78b1145638 Upgrade PathFinding Chunk Search 2022-11-07 00:08:41 -05:00
KAMKEEL f564a388ad CostMalus != 0 :D 2022-11-07 00:08:27 -05:00
Luis C.M e8cea5368f FlyPathFinder:
-Fixed a bit of pathfinding logic to open diagonal path points
2022-11-06 22:37:31 -06:00
KAMKEEL d9af49fa4a Improve Flying Overhaul
-- 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
2022-11-06 22:01:48 -05:00
KAMKEEL f7d90d07ff Limiting Angle Upgrade 2022-11-06 21:44:17 -05:00
KAMKEEL 35533de73c Update FlyPathFinder.java 2022-11-05 04:41:30 -04:00
KAMKEEL 39a2e2f991 Merge Initial Fly 2022-11-05 04:41:08 -04:00
KAMKEEL 98d0161e3d Door Potential Fix 2022-11-05 04:39:10 -04:00
KAMKEEL 6e67dbd37e Fix OpenPoint 2022-11-05 04:20:43 -04:00
KAMKEEL 344e2f0144 Minor Fix 2022-11-05 03:56:01 -04:00
KAMKEEL ad8cd35083 Kam is a Legend 2022-11-05 03:35:55 -04:00
Luis C.M 3e3c459d16 FlyPathFinder:
-WIP improvement to getting safe points
2022-11-05 02:27:59 -05:00
Luis C.M fbb171f06c FlyPathFinder:
-Lag fix for canEntityStandAt
2022-11-05 00:58:19 -05:00
Luis C.M 4bad48352c NPCs no longer constantly pathfind when set to return to their home, and already there.
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.
2022-11-04 23:56:09 -05:00
KAMKEEL d44c33d9fb Update FlyPathFinder.java 2022-11-05 00:53:41 -04:00
KAMKEEL 041abb71bc Kam Is God 2022-11-05 00:47:36 -04:00
c0508383 1facfd133d Fixed NPC flight zig-zagging at high speeds when near the end of the path. 2022-08-28 00:12:15 -05:00
c0508383 502cde0068 Reverted distance check for clearing path entity. 2022-08-27 23:51:14 -05:00
c0508383 02f663f85f Merge remote-tracking branch 'origin/dev' into dev 2022-08-27 23:48:19 -05:00
c0508383 907126cd79 Possible fix for flying NPC lag. 2022-08-27 23:48:07 -05:00
KAMKEEL f1ea2ad961 Fly Comments Removed 2022-08-26 15:45:55 -04:00
KAMKEEL 28de96516d Remove Redundant Fly Code 2022-08-26 15:44:15 -04:00
c0508383 87818a3dbe EntityNPCInterface & EntityAIReturn:
-Fixed follower role
2022-07-20 13:33:21 -05:00
Luis C.M 33bb0307e9 Separated data objects and data controller objects in the noppes.npcs.controllers package. 2022-05-24 01:07:50 -05:00
Luis C.M ec9466c011 Diagonal flight path options now require the two horizontal and vertical path options in an NPCs way to also be clear. 2022-05-15 01:56:00 -05:00
Luis C.M 1f79b52176 More fixes for flight pathing 2022-05-15 01:21:06 -05:00
Luis C.M 44459a23a7 More fixes to flight pathing:
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.
2022-05-14 01:52:20 -05:00
Luis C.M f9f73a75d2 More fixes to flight pathing. 2022-05-14 01:15:54 -05:00
Luis C.M 115b66d0c6 NPC flight fixes and a minor change to the createIItemStack function. 2022-05-13 23:14:55 -05:00
Luis C.M 1cd3ff31b6 Increased the angle limit while pathing for flying NPCs from 15 to 20 degrees 2022-05-04 04:58:59 -05:00
Luis C.M 8033b8ba19 Tweaked vertical speed calculations for NPC flight 2022-05-04 04:10:14 -05:00
Luis C.M a2dd0e502a Slightly improved return to start checks 2022-05-04 03:10:16 -05:00
Luis C.M 85a1892c71 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
2022-05-04 03:06:40 -05:00
luisc 450e065e27 Slightly improved flight pathing downwards. 2022-02-22 01:52:47 -06:00
luisc 33e884c217 Flying is now smoother, NPCs can pathfind downwards easier while flying. 2022-02-18 03:34:20 -06:00
luisc 555ceb741f Added a modifiable and toggleable flying height limit to NPCs 2022-01-13 05:28:20 -06:00
luisc 73db2da124 Fixed flying not working in small enclosed spaces. 2022-01-03 15:50:31 -06:00