Commit Graph
58 Commits
Author SHA1 Message Date
Luis C.M 8d3cd3fd82 Revert "Merge remote-tracking branch 'origin/dev' into dev"
This reverts commit 66edbcea80, reversing
changes made to 3fd962289c.
2022-11-06 01:25:28 -06:00
KAMKEEL 6ae465c5d0 Revert "Added several more functions to pre-existing classes:"
This reverts commit e9a8f8cebc.
2022-11-06 00:10:04 -04:00
Luis C.M e9a8f8cebc Added several more functions to pre-existing classes:
-Spawner, Transport, Healer, Guard, Bard jobs received more functions.
-Added more functions to the transporter role.
-IRole: Added getNpc() function.
-IAnimal, IEntityLiving, and IEntityLivingBase received more functions from their MC counterparts.
-Nearly every function with that takes position/vector parameters now has an equivalent with IPos as a parameter instead.
2022-11-05 20:19:14 -05:00
c0508383 2819c76d0a ICustomNpc:
-Fix for setRetaliateType
2022-07-27 18:47:20 -05:00
c0508383 bd0d7cecf9 Fixed misspelling of "setRangedRange" from "setRangedRage". Kept old function name as a deprecated function not visible in the interface. 2022-07-05 16:31:39 -07:00
Luis C.M 256ba5c599 Removed ScriptFaction in place of IFaction. 2022-07-01 23:26:47 -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
Luis C.M 40a210ce8f Added configurable limits to skin overlays and dialog images. 2022-06-14 23:27:15 -05:00
Luis C.M b64ee1c93a Merge pull request #54 from 1whohears/dev
Some Extra Soul Stone Options
2022-06-09 02:35:22 -05:00
1whohears b7ef1da0d8 added npc.setMinPointsToSoulStone 2022-06-08 22:13:30 -05:00
1whohears 825c42fc52 npc.isSoulStoneinit 2022-06-07 12:31:49 -05:00
1whohears a675033d62 String data can't be null 2022-05-29 14:42:28 -05:00
1whohears fb0ff50994 added get set refuse soul stone
one may want an npc to not be able to be picked up by soul stone in any circumstance
2022-05-29 02:46:24 -05:00
Luis C.M fd0a99b3ed Revert "NPC Skin Changes" 2022-05-29 00:59:40 -05:00
1whohears 9fef65b194 get the name of the player who spawned this npc with soulstone 2022-05-28 23:40:01 -05:00
Luis C.M 0028328db4 More fixes to setting NPC model types. 2022-05-28 07:06:38 -05:00
Luis C.M 968b43a321 setModelType() only takes 0 for Steve, or 1 for Alex as values. 2022-05-28 06:31:52 -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 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 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 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 b6c62332ed Fixed SkinOverlay objects not having their parent object initialized correctly. 2022-05-23 20:47:32 -05:00
Luis C.M 6220a8ce14 -Overlays for players and NPCs are now grouped in an "overlay handler" object, similar to how you retrieve timers.
-Fixed client NPC overlay updates.
2022-05-23 20:41:32 -05:00
Luis C.M 41401d0521 Removed redundant ScriptSkinOverlay, using SkinOverlayData in place of it, which now implements ISkinOverlay. 2022-05-17 04:46:06 -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 71aff8f78f Fix for updating overlay and powered textures. 2022-05-16 01:22:33 -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 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 6896cec417 Every function in API classes that calls the main API class now calls the loaded API wrapper, renamed to NpcAPI, instead of the abstract class, renamed to AbstractNpcAPI. 2022-05-11 17:12:48 -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 c2546c3f82 Updated interfaces to have the proper functions. Documentation will focus around them, so they'll be better organized from now on. 2022-05-11 16:31:14 -05:00
Luis C.M 26f5f86dca Implemented Scripted Custom Items. 2022-05-11 01:10:31 -05:00
luisc 1af875aea9 Fixed concurrent modification bug with NPC tasks. 2022-01-31 23:01:52 -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 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 32792e7d6f Added updateClient() function to ScriptNpc. 2022-01-03 21:30:38 -06:00
luisc de5f119fd7 Added setJob and setRole functions to ScriptNpc 2021-12-29 22:34:51 -06:00
luisc b330678104 Added several projectile functions to ScriptNpc. 2021-12-29 17:17:06 -06:00
luisc e6f97784ff Added get/setRotationType to ScriptNpc. Added get/setMotion for x, y, z components to ScriptEntity. Fixed an NPC wand crash. 2021-12-29 16:22:05 -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 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 94c7df410b Added fly gravity for NPCs, configurable with npc.setFlyGravity(gravity) and npc.getFlyGravity() 2021-12-08 04:50:23 -06:00
luisc 922708bf97 Changed npc field in ScriptNpc to EntityNPCInterface 2021-12-07 23:52:57 -06:00