Commit Graph
215 Commits
Author SHA1 Message Date
luisc f03516b00f Fixed console and console spam with scripted player events. 2021-12-17 08:10:21 -06:00
luisc 23384d1d67 Fixed some server-side lag caused by player events. Player ticks now execute every 10 MC ticks. 2021-12-16 21:54:05 -06:00
luisc 6bdc68337c Revert "Made player script implementation closer to that of 1.12."
This reverts commit 3a9789b3fd.
2021-12-16 04:05:05 -06:00
luisc 3a9789b3fd Made player script implementation closer to that of 1.12. 2021-12-16 02:53:17 -06:00
luisc 69b7a9aab4 Fixed errors in remove and clear functions for bonusAttribute in ScriptDBCPlayer 2021-12-15 06:46:27 -06:00
luisc 9d9c481bdd Added alternative bonusAttribute function for just get remove and clear, as well as dedicated functions for all bonus attribute functions. 2021-12-15 06:19:16 -06:00
luisc 98d2d943ae Added bonusAttribute function, which works the same as the command. 2021-12-15 05:43:07 -06:00
luisc e9a4471cd2 Added getSkills and setSkills functions to ScriptDBCPlayer 2021-12-15 03:19:34 -06:00
luisc 934d5a69d6 Added getFormLevel and setFormLevel to ScriptDBCPlayer 2021-12-15 03:14:48 -06:00
luisc 12cb6a2937 Added blocking() function to ScriptPlayer to check whether the player is blocking. 2021-12-15 00:02:27 -06:00
luisc cad275e845 Added isBlocking, set/getHairCode, set/getExtraCode, and getInventory functions to ScriptDBCPlayer 2021-12-14 21:41:57 -06:00
luisc 816445bccd Script error output shortened to just the error description and line number. 2021-12-13 22:51:33 -06:00
luisc cf91d8638f Fixed getDBCPlayer not returning a DBC Player instance. 2021-12-13 18:33:20 -06:00
luisc 03395ad750 Added getWorld() function to ScriptEntity. 2021-12-13 16:47:15 -06:00
luisc f2da93451f Re-added hasEnchant, addEnchant, setAttribute, getAttribute, hasAttribute, getLore, and setLore to ScriptItemStack after they were lost in a commit A LONG TIME AGO 2021-12-13 03:11:24 -06:00
luisc 00557df9a7 Fixed players being able to push NPCs around. 2021-12-13 00:16:06 -06:00
luisc 541958b630 Fixed "world" keyword in for NPC scripting and API.getIWorld not returning the same instance. 2021-12-12 23:43:44 -06:00
luisc eac3d2c214 Added getSpeed() and setSpeed(speed) functions to ScriptNpc 2021-12-12 23:10:55 -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 743cdb9db7 Revert "Fixed powered texture not showing up when changing NPC model attributes."
This reverts commit 9560228ba8.
2021-12-11 08:38:38 -06:00
luisc fc1c16032f Added RGB and alpha powered texture modifiers:
setPoweredRGBA(r,g,b,alpha)
getPoweredR(),getPoweredG(),getPoweredB(),getPoweredAlpha()
2021-12-10 00:08:47 -06:00
luisc b7d2dab905 Added parameters for texture translation when the NPC is powered, namely npc.display.poweredTranslateX, poweredTranslateY, and poweredTranslateZ, which can all be changed by setPoweredXYZ(x,y,z), and gotten with getPoweredX(), getPoweredY(), and getPoweredZ(). 2021-12-09 23:37:04 -06:00
luisc 9560228ba8 Fixed powered texture not showing up when changing NPC model attributes. 2021-12-09 23:24:36 -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 81881e6e19 Reset aggro range to Integer.MAX_VALUE. Sustainable aggro ranges seem to correlate to client/server RAM, and people should decide what max range is suitable for their client/server. 2021-12-08 20:52:39 -06:00
luisc 909f69575a Set max aggro range to 100. 2021-12-08 20:46:02 -06:00
luisc 34f6f670eb Y velocity when calling entity.knockback() is no longer decreased drastically. 2021-12-08 17:48:35 -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 d66f532643 Made entity field in FlyingMoveHelper final 2021-12-08 15:50:58 -06:00
luisc d37e986006 Fixed NPCs bobbing in the air when flying. 2021-12-08 15:34:41 -06:00
luisc 29db4bfe33 Fixed flying aggro range now working for larger aggro ranges 2021-12-08 06:25:28 -06:00
luisc 90eec7a57b Added GUI fields for setting flying properties of NPCs. Updated en_lang file to add GUI texts. 2021-12-08 05:26:32 -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 922708bf97 Changed npc field in ScriptNpc to EntityNPCInterface 2021-12-07 23:52:57 -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 3c1bc30e44 Floor values are set for max health, combat regen, health regen, melee damage, and projectile damage when changing them now. 2021-12-04 12:46:53 -06:00
luisc cd5b4c0633 Removed shadow when rendering an NPC that shouldn't be visible to a specific player after using setVisibleTo(). 2021-12-03 21:54:13 -06:00
luisc f14bc107d3 Double clicking events in the hook list will now paste them into your code. More scripting functions added for NPCs. 2021-12-03 21:13:56 -06:00
luisc 547f5ab82d Container event spam when no container is open fixed. Fixed scripted player and forge events not launching after merging ScriptContainer and EventScriptContainer. 2021-12-03 18:17:52 -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 17eb612fb8 Fixed NPC Script GUI error not saving/accessing scripts correctly. 2021-12-01 17:42: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 d79ec52994 Update Version 1.3 2021-11-26 04:37:33 -05:00
KAMKEEL 3069488c54 Merge branch 'dev' 2021-11-26 04:35:09 -05:00