Commit Graph
98 Commits
Author SHA1 Message Date
Kam ea217dde75 Merge Dev into Experimental 2024-01-25 01:26:16 -05:00
Kam fc34e0a40d Update CNPC+ to Support GeckoLib Mixin with Addon Classes 2024-01-24 22:05:56 -05:00
Kam d82466e281 Remove Print oops 2024-01-23 23:42:12 -05:00
Kam 509d32bfc1 Add two types of Leaps -- Jump and Pounce 2024-01-23 23:32:02 -05:00
Kam ebffc0e80e Create Combat Handler to help Ai to help manage which player should be at tacked 2024-01-23 23:16:42 -05:00
Kam 3c225f74db GeckoLib Addon is now an OPTIONAL Supported Addon [WIP] 2024-01-22 20:32:03 -05:00
Kam 3e43855128 Merge Dev into PR 110 2024-01-18 14:45:08 -05:00
Goodbird 21c16e5341 Implemented a better synchronisation system for left hand item and projectile item, similar to main hand and armor items system for vanilla 2023-12-08 09:47:18 +03:00
Goodbird 8aa9d16d8e Fixed a bug with bodyOffsetY synchronisation 2023-12-08 09:20:36 +03:00
Luis C.M eed9dbb92e Added line support for ICustomNpc 2023-12-03 20:48:37 -06:00
Kam 3f534ee004 URLs on Cloaks 2023-11-15 22:55:15 -05:00
Kam 5a9bf01f7f Invisible NPC Fix? 2023-09-15 14:33:24 -04:00
Kam 54b46129a9 Capital "I" for Instance 2023-06-05 19:35:27 -04:00
KAMKEEL a2af8ca0b2 Apply isKilled() to update AI Tasks if NPC dies 2023-03-22 11:52:33 -04:00
Luis C.M fe780d69ee Added target lost event. Added all new NPC events to the old 1.7.10 script system. 2023-03-16 04:56:33 -05:00
Luis C.M 29935a1c6d Implemented local NPC event scripts. 2023-03-16 04:27:19 -05:00
Luis C.M 19e14983aa IWorld:
-Fixed isPlaceCancelled and isBreakCancelled functions
2023-03-15 23:10:03 -05:00
KAMKEEL 7db4d2649b Typo correction: "companion" 2023-03-02 16:10:22 -05:00
KAMKEEL bda76bafe6 Optimize Imports 2023-01-12 21:33:06 -05:00
Luis C.M 8905f5f42e Moved NPC puppet data to display data.
Improved mixin functionality, offsets and rotations always reset if the puppet "job" (not a job anymore, always in display) is disabled.
2023-01-11 19:12:53 -06:00
KAMKEEL 6e92f08851 Config Overhaul 2023-01-07 00:21:08 -05:00
KAMKEEL be9ae94163 Start API Branch 2022-11-15 15:25:53 -05:00
KAMKEEL 244bde8586 Fix Indents 2022-11-15 00:48:31 -05:00
Luis C.M 51b412a0bf 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.
2022-11-13 23:49:49 -06:00
Luis C.M d86f571df6 PathNavigateFlying:
-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
2022-11-12 15:53:20 -06:00
Luis C.M 7425e935f1 EntityNPCInterface:
-Fixed flying NPCs not returning to mid-air start y positions.
2022-11-11 16:57:06 -06:00
Luis C.M 2c1a5d330a Improved pathfinding, and made NPCs able to traverse through lava/fire sources and water if immune to fire or able to breathe in water respectively. 2022-11-10 17:38:37 -06:00
Luis C.M 081c47b0aa Path optimizations 2022-11-10 03:26:32 -06:00
Luis C.M 83db114a0d Decreased max safe point tries for flight pathing, and added limit to pathfinding while loop. 2022-11-10 01:18:25 -06:00
Luis C.M 8e023eacfd Fixed flight pathing, merged with some 1.7.10 code. 2022-11-10 00:31:14 -06:00
KAMKEEL cc39e62bd4 Fix Reset Flying NPC to Spawn POINT 2022-11-07 21:23:46 -05:00
KAMKEEL 6c20ff2d14 Fix Fly Remote Reset 2022-11-07 01:40:11 -05:00
KAMKEEL b749ba1dec Add Override to EntityNPCInterface 2022-08-26 15:50:58 -04:00
c0508383 5cbbecf751 Fixed NPCs ignoring knockback resistance when attacked by players that are sprinting or have enchanted items. 2022-08-16 12:30:58 -05:00
c0508383 2819c76d0a ICustomNpc:
-Fix for setRetaliateType
2022-07-27 18:47:20 -05:00
c0508383 87818a3dbe EntityNPCInterface & EntityAIReturn:
-Fixed follower role
2022-07-20 13:33:21 -05:00
Luis C.M 91ac09d8d9 EntityNPCInterface:
-Fixed looping error in setAir() and updateAITasks()
2022-06-29 14:36:17 -05:00
Luis C.M 55b21de050 Added drowning types:
In Air,
In Water,
or
Never
to CNPCs.
2022-06-29 12:21:30 -05:00
KAMKEEL 9e1f19fa53 Add Version Compatibility to PartData
> Fixes MPM Dependency (again)
2022-06-14 22:26:11 -04:00
Luis C.M dfec85484b Quests:
-Quests with complete text now complete the quest in data before showing the text GUI, instead of being completed when that GUI is closed.

Item Quests:
Some fixes to item quest completion when an item is picked up.
2022-06-13 04:08:36 -05:00
Luis C.M 63a1525ee2 API Changes:
-Implemented interfaces for all jobs & roles.

ScriptPlayer:
-Added getData() function, which returns player data objects.

IPlayerData: New class that holds all player data for modification.
-Holds dialog, bank, quest, transport, faction, item giver, and mail data.
-Also holds companion data, with functions has/set/getCompanion, and a getCompanionID function to differentiate companions.
2022-06-12 01:26:23 -05:00
Luis C.M 9c29aabea8 Merged local and global NPC events, deleting old unused event classes. 2022-06-10 18:32:42 -05:00
Luis C.M 8f16e6b20f Added IDialogImage, a scripted object which is used by IDialog. Used to add dialog images.
IDialog:
-Added several new functions for dialogs' new visual attributes, as well as a way to add, get, create, remove, and clear dialog images.

Global NPC events:
-Added fields and variables from the old ScriptEvent events, in preparation to replace the old events with NpcEvent instances on local NPC scripts.
-Fixed issue where some event hooks would run on remote worlds.

Global NPC killed event:
-Added droppedItems and expDropped fields.

IWorld and NpcAPI:
-Now always uses a non-remove WorldServer object to create ScriptWorld objects and add them to the world cache.
2022-06-10 17:25:58 -05:00
Luis C.M c0406958a3 The script controller now checks whether a language can have objects loaded into it on startup, catching an exception and skipping that language as available if so. 2022-05-29 16:01:05 -05:00
Luis C.M 2b15ba9197 Fixed x64 texture bug, breaking textures after switching the model type from x64 to x32
Fixed crash report handler issue with custom overlays.

Removed "textureGlowLocation" field, which is unused now.
2022-05-28 02:12:33 -05:00
Luis C.M ec5fc71413 Merge branch 'master' into dev
# Conflicts:
#	src/main/java/noppes/npcs/scripted/ScriptFaction.java
#	src/main/java/noppes/npcs/scripted/ScriptWorld.java
#	src/main/java/noppes/npcs/scripted/entity/ScriptNpc.java
#	src/main/java/noppes/npcs/scripted/entity/ScriptPlayer.java
#	src/main/java/noppes/npcs/scripted/interfaces/IEntity.java
#	src/main/java/noppes/npcs/scripted/interfaces/IWorld.java
#	src/main/java/noppes/npcs/scripted/interfaces/entity/ICustomNpc.java
#	src/main/java/noppes/npcs/scripted/interfaces/entity/IPlayer.java
2022-05-27 15:31:02 -05:00
1whohears 84973a025a moved projectilesKeepTerrain to DataStats 2022-05-26 01:45:10 -05:00
1whohears a4361b8420 Added various things to the API and other small changes
This adds some useful functions to the api and a few other changes.
I had been creating a custom build of this mod while working on stuff because I couldn't figure out how to do certain things without changing the mod. So this is a collection api features that I think everyone would find useful.

Api additions:
-purchase counting, and disabling trades for the trader role. (if a trade is disabled the gui still says insufficient funds, maybe allow a custom message to appear) added get the traders currency items and sell items.
-if an npc's projectile does explosive damage, you can disable it destroying blocks even if mob griefing is on
-int arrays as stored data for entities
-entity.playSound(...)
-get set if npcs can drown
-player read and unread dialog
-player set faction points
-extra player.sendMessage functions to add custom colors/bold/underline
-player clear inventory
-get set if a follower npc is following a player or waiting
-a bunch of stuff to script faction
-is an item food and how many food points?
-get scoreboard team by it's name
-get and create factions from the script world
-world.rayCastBlockPos is used for getting what block a player is looking at.
-world.getNearestAir is meant to get the block of air above or around the result of world.rayCastBlockPos, or at least that's how I've been using it.

Changes:
-in NoppesUtilServer I feel like if an npc is cloned it's ticksExisted or age should bee zero
-follower npcs should have the canDespawn field automatically set to false...? maybe make it an option
2022-05-24 03:06:16 -05:00
Luis C.M 95bc4bf42d Renamed TransformData to DataTransform. 2022-05-24 01:08:23 -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