Commit Graph
129 Commits
Author SHA1 Message Date
1whohears 77ee403720 RoleFollowers will not despawn if they have an owner
RoleFollowers canDespawn field will be changed back to the value set by the player in the gui/api if they stop following a player
2022-05-26 03:00:49 -05:00
1whohears 6698e8619c world.getNearestAir returns IPos and takes IPos as parameter 2022-05-26 02:10:25 -05:00
1whohears bc85756476 player.getLookingAtBlock returns IBlock 2022-05-26 01:51:05 -05:00
1whohears 84973a025a moved projectilesKeepTerrain to DataStats 2022-05-26 01:45:10 -05:00
1whohears 422dd3fc90 added trader.slotdisabled to trader gui
I just copied what was done to display the trader.insufficient and added trader.slotdisabled to en_US.lang
2022-05-26 01:43:17 -05:00
1whohears aba637be14 removed redundant faction functions
Luis C.M. will add API.getFactions() which returns the FactionController. All these functions use the faction controller anyway.
Also Luis PR already has entity.getDimension and world.spawnEntity
2022-05-25 23:56:36 -05:00
1whohears b97d4eeeb2 added resetPurchaseNum(int slot) 2022-05-25 18:38:54 -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 1e88a4458d Fixed bug with NPC dialog scripts. 2022-04-13 04:25:44 -05: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
Luis C.M 50fe08ce2e Merge branch 'KAMKEEL:master' into master 2022-03-23 03:55:08 -05: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
Luis C.M 769a574210 Fixed setHunger/Saturation using client-side functions from FoodStats 2022-03-19 22:51:39 -05:00
Luis C.M df2e742cbb Added overloaded spawnParticle functions for ScriptEntity 2022-03-16 23:15:30 -05:00
KAMKEEL d867017871 Merge branch 'master' of https://github.com/KAMKEEL/CustomNPC-Plus 2022-03-15 00:21:00 -04:00
luisc 16321dd4ff Added hasLore() function to ScriptItemStack
Fixed getLore() null pointer error
2022-03-06 13:47:47 -06:00
luisc 1cb27a9e7a Implemented XYZ rotations correctly, now clearly rotate around an axis respective to the player's camera. 2022-03-04 18:08:05 -06:00
luisc 75b7c01f87 Removed some unnecessary fields in ScriptEntityParticle 2022-03-02 19:36:15 -06:00
luisc 7f8246e04e PARTICLE ROTATION 2022-03-02 18:18:03 -06:00
luisc 403738262c Added timer functions.
ticks(int id):
Gets the remaining ticks in the timer that matches this id.

setTicks(int id, int ticks):
Sets the remaining ticks in the timer that matches this id.

maxTicks(int id):
Gets the maximum ticks that must elapse for the timer that matches this id to finish.

setMaxTicks(int id, int ticks):
Sets the maximum ticks that must elapse for the timer that matches this id to finish.

repeats(int id):
Returns true if the timer with the given id is set to repeat, false otherwise.

setRepeats(int id, bool repeat):
Sets whether the timer with the given id should repeat. If true, the timer will repeat, and not repeat otherwise.
2022-02-27 23:08:24 -06:00
luisc ee02988d8c Removed client-side imports from EntityNPCFlying 2022-02-22 22:14:05 -06:00
luisc c2a669fbeb The setForm() function in ScriptDBCPlayer prevents crashes from form levels that are out of bounds now. 2022-02-21 20:16:42 -06:00
luisc 18e02461a6 Added misspelled cancel functions to player & forge events, and correctly spelled cancel functions to npc events 2022-02-06 12:39:07 -06:00
KAMKEEL e42c4cab7e Update ScriptLivingBase.java 2022-02-05 20:35:44 -05:00
luisc 7e0ff3c836 Removed println statement please forgive me oh god 2022-02-02 18:21:08 -06:00
luisc 70536de655 Removed checkQuestCompleted from ScriptPlayer, now redundant with new quest checks that happen periodically. 2022-02-02 07:21:45 -06:00
luisc 1ebf747302 Optimized NBT access of player data when checking quest completion, player data variable is passed down to lower functions.
Player's quests are checked for completion every couple seconds now.
2022-02-02 07:18:33 -06:00
luisc 632e92f82e Added set/getPitch to ScriptEntity 2022-02-01 05:10:38 -06:00
luisc 90ca1a0200 Added isAirborne() function to ScriptEntity 2022-02-01 02:30:50 -06:00
luisc 9109c134c1 Added more general setMotion function with x y and z parameters. 2022-01-31 23:59:15 -06:00
luisc 1af875aea9 Fixed concurrent modification bug with NPC tasks. 2022-01-31 23:01:52 -06:00
luisc 7de585843d Added get/setHunger, and get/setSaturation functions for ScriptPlayer.
The player KeyPressed event now sends a list of keys that are currently pressed by the player.
2022-01-31 20:16:00 -06:00
luisc 67c83b1ce9 Added rotation for custom GUI lines, labels, and textured rectangles 2022-01-31 15:39:21 -06:00
luisc 83e13285f9 Added rotation to overlay components, and color codes to overlay labels 2022-01-31 14:51:06 -06:00
luisc da3b04e78e Implemented MC chat formatting for color codes: &l, &m, &r, &o, and &k all affect overlay labels. 2022-01-30 22:41:55 -06:00
luisc e7a19264b2 Added alpha and style options for overlay labels. 2022-01-30 14:22:29 -06:00
luisc e5e1aa1972 Made color and alpha components global among ScriptGui classes. 2022-01-30 05:20:45 -06:00
luisc be61bd4e17 Made color and alpha components global among ScriptOverlay classes. 2022-01-30 04:33:00 -06:00
luisc 534f716991 Implemented Scripted Overlays which stay on the player's screen. Overlays persist in the client, and can be removed from the screen as well. 2022-01-30 04:05:01 -06:00
luisc 8b24dad211 Added Custom GUI Lines, with configurable thickness & color. Draws a line between one point defined by (x1,y1), and another defined by (x2,y2) 2022-01-28 03:21:00 -06:00
luisc f876f13d77 Added 9 more slots for quest kill objectives, and an option for kill quests to progress only if a player kills an NPC with that name.
Added quest interface support to get and modify data from specific quest types.
2022-01-27 05:40:51 -06:00
luisc 989effb5c5 Added more a full inventory to NPCs, selectable on two tabs and double-point values for NPC droprates. 2022-01-27 03:50:36 -06:00
luisc f14337f1bb Added config for NPC sizes, default 100. 2022-01-25 14:54:15 -06:00
luisc eb45a6a959 Added several more dialog functions for the rest of the dialog options. 2022-01-25 14:44:24 -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 83756381e4 Added toggleable shadows and scaling to custom GUI labels. 2022-01-20 20:27:26 -06:00
luisc 007660f16f Added collision options for CNPCs. 2022-01-14 19:07:41 -06:00
luisc 791adfc1b4 Implemented textfield unfocused event 2022-01-14 16:09:27 -06:00
luisc 2874643c84 Fixed textured rectangles in custom GUIs not being placed relative to the GUIs' position. 2022-01-14 15:41:27 -06:00
luisc 555ceb741f Added a modifiable and toggleable flying height limit to NPCs 2022-01-13 05:28:20 -06:00