Commit Graph
6 Commits
Author SHA1 Message Date
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
luisc 04def38b63 Added dialog events to scripted player events 2022-01-12 22:59:03 -06:00
luisc 0d807b36d9 Added isGUIOpen() function, and setPosition function with a dimensionId parameter to ScriptPlayer. 2021-11-16 10:41:04 -06:00
luisc 18aa2d099f Added updatePlayerInventory to ScriptPlayer 2021-10-24 01:53:20 -05:00
luisc 4de969f6c9 Implemented scripted timers for players and NPCs. 2021-10-20 23:04:52 -05:00
luisc 72f2c3c60a Implemented global Forge events. Reorganized NPC API files. 2021-10-18 06:33:39 -05:00