233 Commits
Author SHA1 Message Date
KAMKEEL 5409e4e924 Beta 1.4 1.4-beta 2021-12-21 23:57:35 -05:00
KAMKEEL 6573970840 Update build.gradle 2021-12-21 23:55:10 -05:00
KAMKEEL efdd1d6679 Merge branch 'dev' of https://github.com/KAMKEEL/CustomNPC-Plus into dev 2021-12-21 23:52:54 -05:00
KAMKEEL 4cca8e562c Update Build Gradle 2021-12-21 23:51:36 -05:00
Kamron Vaswani 4c31236590 Merge pull request #18 from c0508383/master
December Pull Request
2021-12-21 23:51:07 -05:00
Kamron Vaswani b62149d5f6 Merge branch 'dev' into master 2021-12-21 23:50:51 -05:00
luisc ff810cbc8d Full console output is now shown again for script errors. 2021-12-20 17:03:54 -06:00
luisc 69d4fb20ff Modified client and server packet sending a little bit for player and forge scripts. 2021-12-20 16:57:05 -06:00
luisc 953f6e0459 Fixed server-side lag caused by player events. THIS IS BIG. 2021-12-18 08:34:30 -06:00
luisc 1a78b2dad7 Timers are only updated if a timer exists for a player. 2021-12-17 17:30:50 -06:00
luisc d46d0aba7e Player events and Forge events run in their own separate buses without redundant registering. 2021-12-17 15:14:52 -06:00
luisc 03ee733620 Forge tick events only run if they are in the starting phase. 2021-12-17 14:26:52 -06:00
luisc 7d94e0e210 Removed forge chunk and terrain gen events. 2021-12-17 08:25:02 -06:00
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