Allows for scripting the scheduling of runnable methods in sequence within the NPC's AI
An example sequence of tasks:
1. Dashes towards player (might take 3-5 seconds, doesn't matter, task durations are dynamic so it can take as long as it needs).
2. Punches player away
3. Waits 10 ticks - Fires a ki blast
4. Teleports behind player
5. Knocks player out
-Fixed pathfinder running into lava & water when it shouldn't.
FlyPathFinder:
-Simplified nodeTypeToOffset switch statement, removed unused function, and made air always return an open path node type.
EntityNPCInterface:
-Fixed "In Air" drowning type. Breathes underwater now.
EntityNPCFlying:
-Fixed NPCs still using flight movement when not being able to breathe.
ICustomNpc:
-Added canBreathe() function
-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.
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