Commit Graph
73 Commits
Author SHA1 Message Date
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
Luis C.M 8bc3190295 Implemented multiple overlay layers for CNPCs, replaces powered textures. 2022-05-17 04:34:46 -05:00
Luis C.M aa9a9499aa Implemented custom powered textures for NPC's, overlays that can have their textures move. 2022-05-15 16:47:48 -05:00
Luis C.M 02d225a269 Fix for the "npc" field in npc events/scripts. 2022-05-11 22:55:26 -05:00
Luis C.M cf33b90b26 Used interfaces in implementations instead of the real classes for most scripted classes. 2022-05-11 22:08:31 -05:00
Luis C.M 6dea5a1cbc Interfaces have a file strucutre resembling the file structure of their implementing classes. 2022-05-11 16:43:14 -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
KAMKEEL 0732d98ff8 1.5.3 Gradle Update | Add Version Compatibility Changes
Update Version to 1.5.3
Remove Useless String Statements / Comments
Add Temporary Fixes to Version Compatibility as permanent fixes
2022-04-09 01:31:21 -04:00
Kamron Vaswani 32f89f8e92 Merge pull request #45 from c0508383/master
Important script hook fix, additions to dialog and dialog closed hooks for NPCs
2022-04-09 01:20:53 -04:00
Luis C.M 65bb3b5939 Important fix to some NPC hook scripts crashing, added option and dialog object fields to local NPC dialog and NPC dialog closed scripts 2022-04-09 00:17:16 -05:00
KAMKEEL ebc0b96582 Code Cleanup for Bow Fix 2022-04-05 17:55:13 -04:00
Luis C.M 18ff2bff78 Implemented Global NPC Events!
All NPCs activate these scripts. If a player wants to create a script that's universally used by all NPCs, this allows for that to happen with a lot of ease!
2022-03-23 03:54:06 -05:00
luisc 732e97e0fe Override updateLeashedState() function in EntityNPCInterface.
NPCs can't be leashed anyway. This should avoid the "does not know how to add entity" crash with NPCs.
2022-02-20 00:56:57 -06:00
luisc 33e884c217 Flying is now smoother, NPCs can pathfind downwards easier while flying. 2022-02-18 03:34:20 -06:00
luisc 1af875aea9 Fixed concurrent modification bug with NPC tasks. 2022-01-31 23:01:52 -06:00
luisc 092b3ce0c1 Fixed overloaded hurt(damage,entity) function not working when an entity is to be hurt by a player 2022-01-22 22:50:01 -06:00
luisc 007660f16f Added collision options for CNPCs. 2022-01-14 19:07:41 -06:00
luisc d50f51e208 Added handler support to NPC API. 2022-01-10 15:21:48 -06:00
luisc 32792e7d6f Added updateClient() function to ScriptNpc. 2022-01-03 21:30:38 -06:00
luisc 00557df9a7 Fixed players being able to push NPCs around. 2021-12-13 00:16:06 -06:00
luisc ba0f21dc26 Revert "Added npc.setPoweredTexture(directory) and npc.getPoweredTexture() functions, along with a new powered texture resource."
This reverts commit ba4bf107b5.
2021-12-11 08:41:54 -06:00
luisc ba4bf107b5 Added npc.setPoweredTexture(directory) and npc.getPoweredTexture() functions, along with a new powered texture resource.
Sample code:
npc.setPoweredTexture("customnpcs:textures/entity/npc_armor.png");
2021-12-08 23:29:08 -06:00
luisc c2564de470 NPCs properly stay floating when not navigating and in the air. 2021-12-08 04:41:41 -06:00
luisc 2147bd00d0 Pathing classes for NPC flying added. NPCs can now follow tactical variants while flying, and their pathing is a LOT better. 2021-12-08 04:00:28 -06:00
luisc 43b3241801 Implemented path navigator and move helper for flying NPCs (npc.getNavigator() and npc.getMoveHelper() used to return the default navigator and move helper, added override function).
Improved Flying AI getting stuck when trying to get over a block towards the enemy.
2021-12-07 03:57:57 -06:00
luisc 12333de3a1 knockback() function for ScriptEntity now *only* knocks the entity back instead of hitting it.
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.
2021-12-06 00:10:10 -06:00