Commit Graph
696 Commits
Author SHA1 Message Date
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
Luis C.M c8a8e866cb IPos:
-Added crossProduct(IPos), divide(scalar), and to/FromLong functions.

NpcAPI:
-Added getAllInBox(from,to)

IBlock:
-Added setPosition functions

IBlock, IPos, IEntity, IWorld: -Added a readable toString() function
2022-11-06 15:08:58 -06:00
Luis C.M 084e6e4149 ScriptBlock:
-More checks for null tile entities.
2022-11-06 01:36:01 -06:00
Luis C.M 0291fd44a5 Merge remote-tracking branch 'origin/louis' into dev 2022-11-06 01:27:45 -06:00
Luis C.M 8d3cd3fd82 Revert "Merge remote-tracking branch 'origin/dev' into dev"
This reverts commit 66edbcea80, reversing
changes made to 3fd962289c.
2022-11-06 01:25:28 -06:00
Luis C.M 5cb5770a20 Fixed NullPointerException crash from breaking blocks that have no tile entities. 2022-11-06 01:23:54 -06:00
Luis C.M 66edbcea80 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	src/main/java/noppes/npcs/scripted/NpcAPI.java
#	src/main/java/noppes/npcs/scripted/ScriptWorld.java
#	src/main/java/noppes/npcs/scripted/interfaces/AbstractNpcAPI.java
2022-11-06 01:00:47 -06:00
Luis C.M 3fd962289c NpcAPI:
-Added getPlayer() function
-Added getChunkLoadingNPCs function
-Added getCurrentPlayerCount, getMaxPlayers, and kickAllPlayers, isHardcore, getFile(path), and getServerOwner functions
2022-11-06 01:59:34 -05:00
KAMKEEL 175fb93958 Added (Player) to Logs 2022-11-06 00:17:22 -04:00
KAMKEEL 6ae465c5d0 Revert "Added several more functions to pre-existing classes:"
This reverts commit e9a8f8cebc.
2022-11-06 00:10:04 -04:00
KAMKEEL 0d3436c71b Fix Ignore Case 2022-11-05 23:59:04 -04:00
KAMKEEL ac39e0a6d0 ScriptLogIgnoreType & PlayerLogging 2022-11-05 23:32:54 -04:00
KAMKEEL 7692c1b628 More Readable Logs with CNPC Level 2022-11-05 21:30:06 -04:00
Luis C.M e9a8f8cebc Added several more functions to pre-existing classes:
-Spawner, Transport, Healer, Guard, Bard jobs received more functions.
-Added more functions to the transporter role.
-IRole: Added getNpc() function.
-IAnimal, IEntityLiving, and IEntityLivingBase received more functions from their MC counterparts.
-Nearly every function with that takes position/vector parameters now has an equivalent with IPos as a parameter instead.
2022-11-05 20:19:14 -05:00
Luis C.M 112e82a09d Made NPC projectile and death events cancellable. 2022-11-05 04:21:30 -05:00
Luis C.M 6782a5b9ba Made NPC dialog event cancellable 2022-11-05 04:19:03 -05:00
Luis C.M 9c82e60a6e EntityNPCFlying:
-Re-implemented flying gravity (woops)
2022-11-05 04:10:00 -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
Luis C.M 7dc0c25330 Merge remote-tracking branch 'origin/dev' into dev 2022-11-04 13:32:16 -05:00
Luis C.M b783d659d3 ModelMPM & RenderNPCInterface:
-Fixed console spam for missing NPC skin and skin overlay textures.
2022-11-04 13:32:08 -05:00
KAMKEEL 5d1477539a Fix Counter & Log Reset 2022-11-03 21:28:18 -04:00
KAMKEEL b757e75dc5 Change Default Values 2022-11-03 20:21:14 -04:00
KAMKEEL fcd50b34c3 ScriptIgnoreFrequency 2022-11-03 20:07:28 -04:00
KAMKEEL 37da3f6069 NPC Script Logging Config V 1.0
Added V 1.0 (CNPC+ Script Logging)
> Logs Activities for when CNPC+ Scripts are called
(Writes to CustomNPCs-latest.log)

Configuration Options Available in Config
2022-11-03 02:47:55 -04:00
KAMKEEL 29b716a25c Fix isEnabled 2022-11-02 14:00:03 -04:00
KAMKEEL e6dbfaa4f5 ScriptingEnabled Fix 2022-11-02 13:38:20 -04:00
KAMKEEL 336e3c2663 Additional Wing Types 2022-11-02 13:37:58 -04:00
Luis C.M 45bda8ffe1 NPC Natural Spawning:
-Further small fixes to natural spawning.
-Fixed "Skipping Entity with id " console spam.
-Entity entries can now be set to null.
-Fixed incorrect event bus logic.
2022-10-31 17:48:53 -05:00
Luis C.M 62c54e24e8 NPC Natural Spawning:
-Null entities are now skipped when determining what NPC in a natural spawn entry to spawn in the world.
2022-10-29 18:30:21 -05:00
Luis C.M abd4ab58a3 Merge remote-tracking branch 'origin/dev' into dev 2022-10-29 16:48:41 -05:00
Luis C.M a8d9285ce5 Very small fix to reading spawn data NBT. 2022-10-29 16:46:53 -05:00
KAMKEEL 2c82714f9a 1.6.4 2022-10-13 17:30:14 -04:00
KAMKEEL 1400967c10 Add Mixin Config 2022-10-06 01:32:15 -04:00