Commit Graph
52 Commits
Author SHA1 Message Date
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 555ceb741f Added a modifiable and toggleable flying height limit to NPCs 2022-01-13 05:28:20 -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 1a78b2dad7 Timers are only updated if a timer exists for a player. 2021-12-17 17:30:50 -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 8c602c4d16 Adjusted floating: NPCs don't float when they're knocked back or hurt. 2021-12-08 17:43:27 -06:00
luisc d37e986006 Fixed NPCs bobbing in the air when flying. 2021-12-08 15:34:41 -06:00
luisc 94c7df410b Added fly gravity for NPCs, configurable with npc.setFlyGravity(gravity) and npc.getFlyGravity() 2021-12-08 04:50:23 -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
luisc 3cd1410c19 Added new ScriptDBCPlayer class for manipulating Dragon Block C attributes.
Flying NPCs no longer chase you down if you're dead, or if they're dead.
2021-12-05 15:04:03 -06:00
luisc 23686dc3b8 Enabled fly button in movement, and extended max values for several NPC attributes, converting some to floats and doubles.
NPCs fly with speed based on their movement speed now.
2021-12-03 00:49:10 -06:00
luisc 44d4e74279 Enabled fly button in movement, and set max value for fields as Integer.MAX_VALUE for various fields. 2021-12-01 18:46:48 -06:00
luisc 72869e6a78 Consolidated EventScriptContainer and ScriptContainer into a single ScriptContainer class. NPCs are now able to fly when ai.movementType == 1. 2021-12-01 15:31:05 -06:00
luisc f3ebf86b1e Critical fix to NBT loading when loading entities into chunks from a different version. 2021-11-29 21:21:49 -06:00
KAMKEEL 3069488c54 Merge branch 'dev' 2021-11-26 04:35:09 -05:00
luisc ecbfd7dab0 Fixed some console spam caused by a NullPointerException when checking scriptVisibleToPlayer(player) in ModelMPM 2021-11-23 15:08:35 -06:00
luisc d24422c3a1 Added setVisibleTo(player,visible) and isVisibleTo(player) to ScriptNpc 2021-11-22 23:34:02 -06:00
luisc a29058d696 Fixed timers on the server-side. 2021-10-22 02:22:45 -05:00
luisc 4de969f6c9 Implemented scripted timers for players and NPCs. 2021-10-20 23:04:52 -05:00
luisc 5515f5ef83 Fixed executeCommand() function for scripting API on the server-side. 2021-10-19 19:49:43 -05:00
luisc 72f2c3c60a Implemented global Forge events. Reorganized NPC API files. 2021-10-18 06:33:39 -05:00
luisc 6752f8baec Implemented several more events for players, including a click event, key event, fall event, and the basic entity living hurt, killed, and kills events, among others. 2021-10-12 02:57:32 -05:00
luisc 1ee14920ff Scripted player tick events are functional, GUI for player events is complete. Global player events run as they should now, just need to start implementing more of them. 2021-10-11 06:49:30 -05:00
luisc 95d2814651 Backported GUI features and necessary classes from 1.12. 2021-09-30 21:44:30 -05:00
KAMKEEL 79339be79a Bow Change
Attempting to Fix Custom Bows
2021-09-24 16:50:28 -04:00
KAMKEEL 3727d1af7a Added Flying Code / Corrected Hidden Parts not Saving
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
2021-07-10 00:48:03 -04:00
KAMKEEL f155ef2481 Fixed Staff Bug
Corrected the Staff Crash issue
2021-06-13 16:35:53 -04:00
KAMKEEL 65eeca72cf Commenting out Fly Changes for Build 2021-06-13 16:24:15 -04:00
KAMKEEL f9bdc66956 Flying Tests 2021-06-13 16:22:06 -04:00
KAMKEEL 2262639182 Create Dev Branch
Add Scripting for ModelType
2021-05-08 03:51:29 -04:00
KAMKEEL 66270715ac Updating Texture Sizes
Attempting to implement a selective renderer to allow for 64x64 Skin Url type for mobs.
2021-05-04 03:52:44 -04:00
KAMKEEL 8a4be0bc1e Big Changes to ModelMPM for 1.8 Layers
> Added all 2D Layers to Models
> Moved Texture Location for PartData to remove texture syncing between MorePlayerModels and CustomNPC.
> Attempted first start at Bodywear 3D model similar to Headwear 3D model.
2021-05-02 22:53:03 -04:00
KAMKEEL 59263e1ad9 Fixed Entity Modeling! 2021-04-30 02:43:35 -04:00
KAMKEEL ea1672a242 Revert "Revert "WORKING MODEL CHANGER!""
This reverts commit d2b5ce2880.
2021-04-29 20:42:52 -04:00
KAMKEEL 2afbdbf94d Revert "Model Switcher Information + Cleanup"
This reverts commit 82f2323178.
2021-04-29 20:42:38 -04:00
KAMKEEL d2b5ce2880 Revert "WORKING MODEL CHANGER!"
This reverts commit 97dc3e9f13.
2021-04-29 20:41:55 -04:00
KAMKEEL 82f2323178 Model Switcher Information + Cleanup
Removing all attempted methods.

Model Switcher Reasoning: The code Noppes currently has working only allows the basic EntityCustomNpc to have the GUI, Parts and Scaling. If the Model Switcher can simply replace the current model of the EntityCustomNpc  then it will retain all functionality.

SkinUrl and Username are currently still broken with the new model switcher method. Will attempt to fix soon.
2021-04-29 20:18:46 -04:00
KAMKEEL 97dc3e9f13 WORKING MODEL CHANGER!
Added Working Model Changer that allows you to change between Default, Steve 64 x 64, Alex Models. Now instead of selecting a completely different Entity, simply go to the Model Editor to change the Model Type and Version.
2021-04-29 20:13:16 -04:00
KAMKEEL aeb807cea7 Fixed SkinUrl for 64x64 Textures
Must Enable the Square Texture Button on NPC in order to work correct. Local Textures work just fine normally.
2021-04-29 14:37:33 -04:00
KAMKEEL 51b8e34c02 More Changes Attempted
Attempting to figure out how to render 2 versions of one EntityCustomNpc, all attempts failed thus far.
2021-04-29 06:37:35 -04:00
KAMKEEL 5f2b7a0142 CustomNPC64 Created and Completed
Working on editting the code so that the load texture function is called differently for CustomNPC64.
2021-04-29 02:53:19 -04:00
KAMKEEL 9ddbf2ee45 Changes to ModelMPM and Renderer
Attempting to get SkinUrls to match for 1.8 Skins
2021-04-29 01:10:15 -04:00
KAMKEEL 301aa17463 Add NPC64 Files
Note* NPC 64x64 does not work as of right now, I can't get the model and textures to line up correctly. If anyone wants to reach out please do.
2021-04-27 21:05:00 -04:00