2021-09-30 21:44:30 -05:00
|
|
|
//
|
|
|
|
|
// Source code recreated from a .class file by IntelliJ IDEA
|
|
|
|
|
// (powered by FernFlower decompiler)
|
|
|
|
|
//
|
|
|
|
|
|
2022-05-11 16:43:14 -05:00
|
|
|
package noppes.npcs.scripted.interfaces.entity;
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
import net.minecraft.entity.EntityCreature;
|
2022-06-08 22:13:30 -05:00
|
|
|
import noppes.npcs.scripted.interfaces.ITimers;
|
2022-05-23 20:41:32 -05:00
|
|
|
import noppes.npcs.scripted.interfaces.handler.IOverlayHandler;
|
2022-07-01 23:26:47 -05:00
|
|
|
import noppes.npcs.scripted.interfaces.handler.data.IFaction;
|
2022-05-11 16:43:14 -05:00
|
|
|
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
2022-06-08 22:13:30 -05:00
|
|
|
import noppes.npcs.scripted.roles.ScriptJobInterface;
|
|
|
|
|
import noppes.npcs.scripted.roles.ScriptRoleInterface;
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-10-12 02:57:32 -05:00
|
|
|
public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
|
2021-09-30 21:44:30 -05:00
|
|
|
/**
|
|
|
|
|
* @return Returns the current npcs size 1-30
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getSize();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param size The size of the npc (1-30) default is 5
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setSize(int size);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the current npcs modelType of the NPC
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getModelType();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param modelType The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setModelType(int modelType);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The npcs name
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
String getName();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRotation(float rotation);
|
2022-05-27 15:31:02 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRotationType(int rotationType);
|
2022-05-27 15:31:02 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
int getRotationType();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param name The name of the npc
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setName(String name);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 1.7.10
|
|
|
|
|
* @return The npcs title
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
String getTitle();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 1.7.10
|
|
|
|
|
* @param title The title of the npc
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setTitle(String title);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The npcs texture
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
String getTexture();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param texture The texture of the npc
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setTexture(String texture);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Home position x
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getHomeX();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param x The home x position
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setHomeX(int x);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Home position x
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getHomeY();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param y The home y position
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setHomeY(int y);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Home position x
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getHomeZ();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param z The home x position
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setHomeZ(int z);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param x The home x position
|
|
|
|
|
* @param y The home y position
|
|
|
|
|
* @param z The home z position
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setHome(int x, int y, int z);
|
2021-09-30 21:44:30 -05:00
|
|
|
/**
|
|
|
|
|
* @param health New max health
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMaxHealth(double health);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param bo Whether or not the npc will try to return to his home position
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setReturnToHome(boolean bo);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Whether or not the npc returns home
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean getReturnToHome();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The faction of the npc
|
|
|
|
|
*/
|
2022-07-01 23:26:47 -05:00
|
|
|
IFaction getFaction();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param id The id of the new faction
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setFaction(int id);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-12-03 21:13:56 -06:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param attackOtherFactions True if you want the NPC to attack other factions, false otherwise.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setAttackFactions(boolean attackOtherFactions);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns true if the NPC attacks other factions, false otherwise.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean getAttackFactions();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param defendFaction True if the NPC should defend faction members, false otherwise.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setDefendFaction(boolean defendFaction);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns true if the NPC should defend faction members, false otherwise.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean getDefendFaction();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
int getType();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean typeOf(int type);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param target The targeted npc
|
|
|
|
|
* @param item The item you want to shoot
|
|
|
|
|
* @param accuracy Accuracy of the shot (0-100)
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void shootItem(IEntityLivingBase target, IItemStack item, int accuracy);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-27 15:31:02 -05:00
|
|
|
void setProjectilesKeepTerrain(boolean b);
|
|
|
|
|
|
|
|
|
|
boolean getProjectilesKeepTerrain();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param message The message the npc will say
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void say(String message);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param message The message the npc will say
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void say(IPlayer player, String message);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Kill the npc, doesnt't despawn it
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void kill();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Basically completely resets the npc. This will also call the Init script
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void reset();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the npcs current role
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
ScriptRoleInterface getRole();
|
|
|
|
|
|
|
|
|
|
void setRole(int role);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the npcs current job
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
ScriptJobInterface getJob();
|
|
|
|
|
|
|
|
|
|
void setJob(int job);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The item held in the right hand
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
IItemStack getRightItem();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param item Item to be held in the right hand
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void setRightItem(IItemStack item);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The item held in the left hand
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
IItemStack getLefttItem();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param item Item to be held in the left hand
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void setLeftItem(IItemStack item);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the projectile the npc uses
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
IItemStack getProjectileItem();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param item Item to be used as projectile
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void setProjectileItem(IItemStack item);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-12-03 21:13:56 -06:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns true if the NPC can aim while shooting.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean canAimWhileShooting();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param aimWhileShooting Set to true if you want the NPC to aim while shooting, false otherwise.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void aimWhileShooting(boolean aimWhileShooting);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMinProjectileDelay(int minDelay);
|
|
|
|
|
int getMinProjectileDelay();
|
2021-12-29 17:17:06 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMaxProjectileDelay(int maxDelay);
|
|
|
|
|
int getMaxProjectileDelay();
|
2021-12-29 17:17:06 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRangedRage(int rangedRange);
|
|
|
|
|
int getRangedRage();
|
2021-12-29 17:17:06 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setFireRate(int rate);
|
|
|
|
|
int getFireRate();
|
2021-12-29 17:17:06 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setBurstCount(int burstCount);
|
|
|
|
|
int getBurstCount();
|
2021-12-29 17:17:06 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setShotCount(int shotCount);
|
|
|
|
|
int getShotCount();
|
2021-12-29 17:17:06 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setAccuracy(int accuracy);
|
|
|
|
|
int getAccuracy();
|
2021-12-29 17:17:06 -06:00
|
|
|
|
2021-12-03 21:13:56 -06:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return The directory of the sound that plays when a projectile is shot
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
String getFireSound();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param fireSound The new directory of the sound that plays when a projectile is shot
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setFireSound(String fireSound);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2021-09-30 21:44:30 -05:00
|
|
|
/**
|
|
|
|
|
* @param slot The armor slot to return. 0:head, 1:body, 2:legs, 3:boots
|
|
|
|
|
* @return Returns the worn armor in slot
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
IItemStack getArmor(int slot);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param slot The armor slot to set. 0:head, 1:body, 2:legs, 3:boots
|
|
|
|
|
* @param item Item to be set as armor
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void setArmor(int slot, IItemStack item);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-12-03 21:13:56 -06:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param slot The slot from the NPC's drop list to return (0-8)
|
|
|
|
|
* @return The item in the NPC's drop list slot
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
IItemStack getLootItem(int slot);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param slot The slot from the NPC's drop list to change
|
|
|
|
|
* @param item The item the drop list slot will be changed to
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void setLootItem(int slot, IItemStack item);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param slot The slot from the NPC's drop list to return (0-8)
|
|
|
|
|
* @return The chance of dropping the item in this slot. Returns 100 if the slot is not found.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
double getLootChance(int slot);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param slot The slot from the NPC's drop list to change
|
|
|
|
|
* @param chance The new chance of dropping the item in this slot
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setLootChance(int slot, double chance);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getLootMode();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param lootMode The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setLootMode(int lootMode);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param lootXP The new minimum XP gained from killing the NPC. If greater than the max XP, it will be set to it.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMinLootXP(int lootXP);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param lootXP The new maximum XP gained from killing the NPC. If less than the min XP, it will be set to it.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMaxLootXP(int lootXP);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return The minimum XP gained from killing the NPC.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getMinLootXP();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return The maximum XP gained from killing the NPC.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getMaxLootXP();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-27 15:31:02 -05:00
|
|
|
boolean getCanDrown();
|
|
|
|
|
|
2022-06-29 12:21:30 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param type 0 - Never drowns, 1 - Drowns in water, 2 - Drowns in air (without water)
|
|
|
|
|
*/
|
|
|
|
|
void setDrowningType(int type);
|
2022-05-27 15:31:02 -05:00
|
|
|
|
2021-09-30 21:44:30 -05:00
|
|
|
/**
|
|
|
|
|
* @param type The AnimationType
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setAnimation(int type);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-12-03 21:13:56 -06:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param variant Changes the tactical variant of the NPC.
|
|
|
|
|
* 0 - Rush
|
|
|
|
|
* 1 - Dodge
|
|
|
|
|
* 2 - Surround
|
|
|
|
|
* 3 - Hit N Run
|
|
|
|
|
* 4 - Ambush
|
|
|
|
|
* 5 - Stalk
|
|
|
|
|
* 6 - None
|
|
|
|
|
*
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setTacticalVariant(int variant);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns the tactical variant of the NPC.
|
|
|
|
|
* 0 - Rush
|
|
|
|
|
* 1 - Dodge
|
|
|
|
|
* 2 - Surround
|
|
|
|
|
* 3 - Hit N Run
|
|
|
|
|
* 4 - Ambush
|
|
|
|
|
* 5 - Stalk
|
|
|
|
|
* 6 - None
|
|
|
|
|
*
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getTacticalVariant();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param variant Sets the NPC's tactical variant by name.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setTacticalVariant(String variant);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns the name of the NPc's tactical variant.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
String getTacticalVariantName();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param tacticalRadius Sets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setTacticalRadius(int tacticalRadius);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Gets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getTacticalRadius();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param ignore True if the NPC goes through cobwebs
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setIgnoreCobweb(boolean ignore);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return True if the NPC goes through cobwebs
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean getIgnoreCobweb();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Changes what the NPC does when it finds an enemy based on the integer given.
|
|
|
|
|
* 0 - Retaliate
|
|
|
|
|
* 1 - Panic
|
|
|
|
|
* 2 - Retreat
|
|
|
|
|
* 3 - Nothing
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setOnFoundEnemy(int onAttack);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns an integer representing what the NPC does when it finds an enemy.
|
|
|
|
|
* 0 - Retaliate
|
|
|
|
|
* 1 - Panic
|
|
|
|
|
* 2 - Retreat
|
|
|
|
|
* 3 - Nothing
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int onFoundEnemy();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param shelterFrom An integer representing what conditions the NPC seeks shelter under.
|
|
|
|
|
* 0 - Darkenss
|
|
|
|
|
* 1 - Sunlight
|
|
|
|
|
* 2 - Disabled
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setShelterFrom(int shelterFrom);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns an integer representing what conditions the NPC seeks shelter under.
|
|
|
|
|
* 0 - Darkenss
|
|
|
|
|
* 1 - Sunlight
|
|
|
|
|
* 2 - Disabled
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getShelterFrom();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Whether the NPC has a living animation
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean hasLivingAnimation();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param livingAnimation True if you want the NPC to have a living animation, false otherwise
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setLivingAnimation(boolean livingAnimation);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2021-09-30 21:44:30 -05:00
|
|
|
/**
|
|
|
|
|
* @param type The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setVisibleType(int type);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getVisibleType();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-11-22 23:34:02 -06:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param player The player this NPC becomes visible/invisible to
|
|
|
|
|
* @param visible True if you want the NPC to be invisible to the player, false otherwise
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void setVisibleTo(IPlayer player, boolean visible);
|
2021-11-22 23:34:02 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param player The player this NPC is visible/invisible to
|
|
|
|
|
* @return False if the NPC has been toggled to be invisible to this player, true otherwise.
|
|
|
|
|
* If setVisibleTo(player,visible) was not called to make this NPC invisible to the player at any point
|
|
|
|
|
* in the NPC's life, this function will return true regardless of the value of isVisible().
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
boolean isVisibleTo(IPlayer player);
|
2021-11-22 23:34:02 -06:00
|
|
|
|
2021-09-30 21:44:30 -05:00
|
|
|
/**
|
|
|
|
|
* @param type The visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setShowName(int type);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getShowName();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the visiblity of the boss bar, 0:invisible, 1:visible, 2:when-attacking
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getShowBossBar();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param type The visibility type of the boss bar, 0:invisible, 1:visible, 2:when-attacking
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setShowBossBar(int type);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The melee strength
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getMeleeStrength();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param strength The melee strength
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMeleeStrength(float strength);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The melee speed
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getMeleeSpeed();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param speed The melee speed
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMeleeSpeed(int speed);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The ranged strength
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getRangedStrength();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param strength The ranged strength
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRangedStrength(float strength);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The ranged speed
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getRangedSpeed();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param speed The ranged speed
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRangedSpeed(int speed);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return The ranged burst count
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getRangedBurst();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param count The ranged burst count
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRangedBurst(int count);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-12-03 21:13:56 -06:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return The amount of ticks before this entity respawns
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getRespawnTime();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param time The new amount of ticks before this entity respawns
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRespawnTime(int time);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
int getRespawnCycle();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param cycle Sets when the NPC respawns. Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRespawnCycle(int cycle);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Whether the NPC is hidden when it dies
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean getHideKilledBody();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param hide True if the NPC is hidden when it dies. False otherwise.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void hideKilledBody(boolean hide);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns true if the NPC naturally despawns.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean naturallyDespawns();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param canDespawn True if the NPC should naturally despawn. False otherwise.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setNaturallyDespawns(boolean canDespawn);
|
2022-05-28 23:40:01 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return true if this npc was spawned by a player using soulstone
|
|
|
|
|
*/
|
|
|
|
|
boolean spawnedFromSoulStone();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return the name of the player who spawned this npc using soulstone. null if not spawned by soulstone
|
|
|
|
|
*/
|
|
|
|
|
String getSoulStonePlayerName();
|
|
|
|
|
|
2022-06-07 12:31:49 -05:00
|
|
|
/**
|
|
|
|
|
* @return true if npc was spawned by soul stone. becomes false after the init function is called.
|
|
|
|
|
*/
|
|
|
|
|
boolean isSoulStoneInit();
|
|
|
|
|
|
2022-05-29 02:46:24 -05:00
|
|
|
/**
|
|
|
|
|
* @return does this npc refuse to be taken by soul stone
|
|
|
|
|
*/
|
|
|
|
|
boolean getRefuseSoulStone();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param refuse set if this npc refuses to be taken by soul stone
|
|
|
|
|
*/
|
|
|
|
|
void setRefuseSoulStone(boolean refuse);
|
|
|
|
|
|
2022-06-08 22:13:30 -05:00
|
|
|
/**
|
|
|
|
|
* requires SoulStoneFriendlyNPCs in config to be true
|
|
|
|
|
* -1 by default
|
|
|
|
|
* if -1, the minimum points are the faction's friendly points
|
|
|
|
|
* @return the minimum faction points needed to soulstone this npc
|
|
|
|
|
*/
|
|
|
|
|
int getMinPointsToSoulStone();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* requires SoulStoneFriendlyNPCs in config to be true
|
|
|
|
|
* -1 by default
|
|
|
|
|
* if -1, the minimum points are the faction's friendly points
|
|
|
|
|
* @param points the minimum faction points needed to soulstone this npc
|
|
|
|
|
*/
|
|
|
|
|
void setMinPointsToSoulStone(int points);
|
|
|
|
|
|
2021-09-30 21:44:30 -05:00
|
|
|
/**
|
|
|
|
|
* @param player The player to give the item to
|
|
|
|
|
* @param item The item given to the player
|
|
|
|
|
*/
|
2022-05-11 22:08:31 -05:00
|
|
|
void giveItem(IPlayer player, IItemStack item);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* On servers the enable-command-block option in the server.properties needs to be set to true
|
|
|
|
|
* @param command The command to be executed
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void executeCommand(String command);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setHeadScale(float x, float y, float z);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setBodyScale(float x, float y, float z);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setArmsScale(float x, float y, float z);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setLegsScale(float x, float y, float z);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 1.7.10c
|
|
|
|
|
* @param resistance Explosion resistance (0-2) default is 1
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setExplosionResistance(float resistance);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 1.7.10c
|
|
|
|
|
* @return Returns Explosion Resistance
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getExplosionResistance();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param resistance Melee resistance (0-2) default is 1
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setMeleeResistance(float resistance);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns Melee Resistance
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getMeleeResistance();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param resistance Arrow resistance (0-2) default is 1
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setArrowResistance(float resistance);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns Arrow Resistance
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getArrowResistance();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param resistance Knockback resistance (0-2) default is 1
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setKnockbackResistance(float resistance);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns Knockback Resistance
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getKnockbackResistance();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param type Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothing
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setRetaliateType(int type);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the combat health regen per second
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getCombatRegen();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param regen The combat health regen per second
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setCombatRegen(float regen);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Returns the health regen per second when not in combat
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
float getHealthRegen();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param regen The health regen per second when not in combat
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
void setHealthRegen(float regen);
|
|
|
|
|
|
|
|
|
|
long getAge();
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
ITimers getTimers();
|
2021-12-03 00:49:10 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setFly(int fly);
|
2021-12-06 00:10:10 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean canFly();
|
2021-12-03 00:49:10 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setFlySpeed(double flySpeed);
|
2021-12-06 00:10:10 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
double getFlySpeed(double flySpeed);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setFlyGravity(double flyGravity);
|
2021-12-03 00:49:10 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
double getFlyGravity(double flyGravity);
|
2021-12-06 00:10:10 -06:00
|
|
|
|
2022-05-17 04:53:41 -05:00
|
|
|
void setFlyHeightLimit(int flyHeightLimit);
|
2021-12-03 00:49:10 -06:00
|
|
|
|
2022-05-17 04:53:41 -05:00
|
|
|
int getFlyHeightLimit(int flyHeightLimit);
|
2021-12-06 00:10:10 -06:00
|
|
|
|
2022-05-17 04:53:41 -05:00
|
|
|
void limitFlyHeight(boolean limit);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-17 04:53:41 -05:00
|
|
|
boolean isFlyHeightLimited(boolean limit);
|
2021-12-08 04:50:23 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setSpeed(int speed);
|
2021-12-08 04:50:23 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
int getSpeed();
|
2021-12-12 23:10:55 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setSkinType(byte type);
|
2021-12-12 23:10:55 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
byte getSkinType();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setSkinUrl(String url);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
String getSkinUrl();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setCloakTexture(String cloakTexture);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
String getCloakTexture();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setOverlayTexture(String overlayTexture);
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
String getOverlayTexture();
|
2021-12-03 21:13:56 -06:00
|
|
|
|
2022-05-23 20:41:32 -05:00
|
|
|
IOverlayHandler getOverlays();
|
2022-01-03 21:30:38 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void setCollisionType(int type);
|
2022-01-14 19:07:41 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
int getCollisionType();
|
2022-01-14 19:07:41 -06:00
|
|
|
|
2022-05-11 16:31:14 -05:00
|
|
|
void updateClient();
|
2021-09-30 21:44:30 -05:00
|
|
|
}
|