mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-17 16:55:15 +00:00
Add CNPC+ Api
This commit is contained in:
1 parent
0c4db676e4
commit
95e2f9df01
109 files changed
+7308
No files matched your search
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public interface IAnimal<T extends EntityAnimal> extends IEntityLiving<T> {
|
||||
/**
|
||||
* Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
|
||||
* the animal type)
|
||||
*/
|
||||
boolean isBreedingItem(IItemStack itemStack);
|
||||
|
||||
/**
|
||||
* Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
|
||||
*/
|
||||
boolean interact(IPlayer player);
|
||||
|
||||
boolean isInLove();
|
||||
|
||||
void resetInLove();
|
||||
|
||||
boolean canMateWith(IAnimal animal);
|
||||
}
|
||||
@@ -0,0 +1,821 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.ITimers;
|
||||
import noppes.npcs.api.handler.IOverlayHandler;
|
||||
import noppes.npcs.api.handler.data.IFaction;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.jobs.IJob;
|
||||
import noppes.npcs.api.roles.IRole;
|
||||
|
||||
public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
|
||||
/**
|
||||
* @return Returns the current npcs size 1-30
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* @param size The size of the npc (1-30) default is 5
|
||||
*/
|
||||
void setSize(int size);
|
||||
|
||||
/**
|
||||
* @return Returns the current npcs modelType of the NPC
|
||||
*/
|
||||
int getModelType();
|
||||
|
||||
/**
|
||||
* @param modelType The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
|
||||
*/
|
||||
void setModelType(int modelType);
|
||||
|
||||
/**
|
||||
* @return The npcs name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
void setRotation(float rotation);
|
||||
|
||||
void setRotationType(int rotationType);
|
||||
|
||||
int getRotationType();
|
||||
|
||||
/**
|
||||
* @param name The name of the npc
|
||||
*/
|
||||
void setName(String name);
|
||||
|
||||
/**
|
||||
* @since 1.7.10
|
||||
* @return The npcs title
|
||||
*/
|
||||
String getTitle();
|
||||
|
||||
/**
|
||||
* @since 1.7.10
|
||||
* @param title The title of the npc
|
||||
*/
|
||||
void setTitle(String title);
|
||||
|
||||
/**
|
||||
* @return The npcs texture
|
||||
*/
|
||||
String getTexture();
|
||||
|
||||
/**
|
||||
* @param texture The texture of the npc
|
||||
*/
|
||||
void setTexture(String texture);
|
||||
|
||||
IPos getHome();
|
||||
|
||||
/**
|
||||
* @return Home position x
|
||||
*/
|
||||
int getHomeX();
|
||||
|
||||
/**
|
||||
* @param x The home x position
|
||||
*/
|
||||
void setHomeX(int x);
|
||||
|
||||
/**
|
||||
* @return Home position x
|
||||
*/
|
||||
int getHomeY();
|
||||
|
||||
/**
|
||||
* @param y The home y position
|
||||
*/
|
||||
void setHomeY(int y);
|
||||
|
||||
/**
|
||||
* @return Home position x
|
||||
*/
|
||||
int getHomeZ();
|
||||
|
||||
/**
|
||||
* @param z The home x position
|
||||
*/
|
||||
void setHomeZ(int z);
|
||||
|
||||
/**
|
||||
* @param x The home x position
|
||||
* @param y The home y position
|
||||
* @param z The home z position
|
||||
*/
|
||||
void setHome(int x, int y, int z);
|
||||
|
||||
void setHome(IPos pos);
|
||||
|
||||
/**
|
||||
* @param health New max health
|
||||
*/
|
||||
void setMaxHealth(double health);
|
||||
|
||||
/**
|
||||
* @param bo Whether or not the npc will try to return to his home position
|
||||
*/
|
||||
void setReturnToHome(boolean bo);
|
||||
|
||||
/**
|
||||
* @return Whether or not the npc returns home
|
||||
*/
|
||||
boolean getReturnToHome();
|
||||
|
||||
/**
|
||||
* @return The faction of the npc
|
||||
*/
|
||||
IFaction getFaction();
|
||||
|
||||
/**
|
||||
* @param id The id of the new faction
|
||||
*/
|
||||
void setFaction(int id);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param attackOtherFactions True if you want the NPC to attack other factions, false otherwise.
|
||||
*/
|
||||
void setAttackFactions(boolean attackOtherFactions);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC attacks other factions, false otherwise.
|
||||
*/
|
||||
boolean getAttackFactions();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param defendFaction True if the NPC should defend faction members, false otherwise.
|
||||
*/
|
||||
void setDefendFaction(boolean defendFaction);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC should defend faction members, false otherwise.
|
||||
*/
|
||||
boolean getDefendFaction();
|
||||
|
||||
int getType();
|
||||
|
||||
boolean typeOf(int type);
|
||||
|
||||
/**
|
||||
* @param target The targeted npc
|
||||
* @param item The item you want to shoot
|
||||
* @param accuracy Accuracy of the shot (0-100)
|
||||
*/
|
||||
void shootItem(IEntityLivingBase target, IItemStack item, int accuracy);
|
||||
|
||||
void setProjectilesKeepTerrain(boolean b);
|
||||
|
||||
boolean getProjectilesKeepTerrain();
|
||||
|
||||
/**
|
||||
* @param message The message the npc will say
|
||||
*/
|
||||
void say(String message);
|
||||
|
||||
/**
|
||||
* @param message The message the npc will say
|
||||
*/
|
||||
void say(IPlayer player, String message);
|
||||
|
||||
/**
|
||||
* Kill the npc, doesnt't despawn it
|
||||
*/
|
||||
void kill();
|
||||
|
||||
/**
|
||||
* Basically completely resets the npc. This will also call the Init script
|
||||
*/
|
||||
void reset();
|
||||
|
||||
/**
|
||||
* @return Returns the npcs current role
|
||||
*/
|
||||
IRole getRole();
|
||||
|
||||
void setRole(int role);
|
||||
|
||||
/**
|
||||
* @return Returns the npcs current job
|
||||
*/
|
||||
IJob getJob();
|
||||
|
||||
void setJob(int job);
|
||||
|
||||
/**
|
||||
* @return The item held in the right hand
|
||||
*/
|
||||
IItemStack getRightItem();
|
||||
|
||||
/**
|
||||
* @param item Item to be held in the right hand
|
||||
*/
|
||||
void setRightItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* @return The item held in the left hand
|
||||
*/
|
||||
IItemStack getLefttItem();
|
||||
|
||||
/**
|
||||
* @param item Item to be held in the left hand
|
||||
*/
|
||||
void setLeftItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* @return Returns the projectile the npc uses
|
||||
*/
|
||||
IItemStack getProjectileItem();
|
||||
|
||||
/**
|
||||
* @param item Item to be used as projectile
|
||||
*/
|
||||
void setProjectileItem(IItemStack item);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC can aim while shooting.
|
||||
*/
|
||||
boolean canAimWhileShooting();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param aimWhileShooting Set to true if you want the NPC to aim while shooting, false otherwise.
|
||||
*/
|
||||
void aimWhileShooting(boolean aimWhileShooting);
|
||||
|
||||
void setMinProjectileDelay(int minDelay);
|
||||
int getMinProjectileDelay();
|
||||
|
||||
void setMaxProjectileDelay(int maxDelay);
|
||||
int getMaxProjectileDelay();
|
||||
|
||||
void setRangedRange(int rangedRange);
|
||||
int getRangedRange();
|
||||
|
||||
void setFireRate(int rate);
|
||||
int getFireRate();
|
||||
|
||||
void setBurstCount(int burstCount);
|
||||
int getBurstCount();
|
||||
|
||||
void setShotCount(int shotCount);
|
||||
int getShotCount();
|
||||
|
||||
void setAccuracy(int accuracy);
|
||||
int getAccuracy();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The directory of the sound that plays when a projectile is shot
|
||||
*/
|
||||
String getFireSound();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fireSound The new directory of the sound that plays when a projectile is shot
|
||||
*/
|
||||
void setFireSound(String fireSound);
|
||||
|
||||
/**
|
||||
* @param slot The armor slot to return. 0:head, 1:body, 2:legs, 3:boots
|
||||
* @return Returns the worn armor in slot
|
||||
*/
|
||||
IItemStack getArmor(int slot);
|
||||
|
||||
/**
|
||||
* @param slot The armor slot to set. 0:head, 1:body, 2:legs, 3:boots
|
||||
* @param item Item to be set as armor
|
||||
*/
|
||||
void setArmor(int slot, IItemStack item);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot The slot from the NPC's drop list to return (0-8)
|
||||
* @return The item in the NPC's drop list slot
|
||||
*/
|
||||
IItemStack getLootItem(int slot);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot The slot from the NPC's drop list to change
|
||||
* @param item The item the drop list slot will be changed to
|
||||
*/
|
||||
void setLootItem(int slot, IItemStack item);
|
||||
|
||||
/**
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
double getLootChance(int slot);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot The slot from the NPC's drop list to change
|
||||
* @param chance The new chance of dropping the item in this slot
|
||||
*/
|
||||
void setLootChance(int slot, double chance);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
|
||||
*/
|
||||
int getLootMode();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lootMode The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
|
||||
*/
|
||||
void setLootMode(int lootMode);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lootXP The new minimum XP gained from killing the NPC. If greater than the max XP, it will be set to it.
|
||||
*/
|
||||
void setMinLootXP(int lootXP);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lootXP The new maximum XP gained from killing the NPC. If less than the min XP, it will be set to it.
|
||||
*/
|
||||
void setMaxLootXP(int lootXP);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The minimum XP gained from killing the NPC.
|
||||
*/
|
||||
int getMinLootXP();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The maximum XP gained from killing the NPC.
|
||||
*/
|
||||
int getMaxLootXP();
|
||||
|
||||
boolean getCanDrown();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type 0 - Never drowns, 1 - Drowns in water, 2 - Drowns in air (without water)
|
||||
*/
|
||||
void setDrowningType(int type);
|
||||
|
||||
boolean canBreathe();
|
||||
|
||||
/**
|
||||
* @param type The AnimationType
|
||||
*/
|
||||
void setAnimation(int type);
|
||||
|
||||
/**
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
void setTacticalVariant(int variant);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns the tactical variant of the NPC.
|
||||
* 0 - Rush
|
||||
* 1 - Dodge
|
||||
* 2 - Surround
|
||||
* 3 - Hit N Run
|
||||
* 4 - Ambush
|
||||
* 5 - Stalk
|
||||
* 6 - None
|
||||
*
|
||||
*/
|
||||
int getTacticalVariant();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param variant Sets the NPC's tactical variant by name.
|
||||
*/
|
||||
void setTacticalVariant(String variant);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns the name of the NPc's tactical variant.
|
||||
*/
|
||||
String getTacticalVariantName();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tacticalRadius Sets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
|
||||
*/
|
||||
void setTacticalRadius(int tacticalRadius);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Gets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
|
||||
*/
|
||||
int getTacticalRadius();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ignore True if the NPC goes through cobwebs
|
||||
*/
|
||||
void setIgnoreCobweb(boolean ignore);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return True if the NPC goes through cobwebs
|
||||
*/
|
||||
boolean getIgnoreCobweb();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Changes what the NPC does when it finds an enemy based on the integer given.
|
||||
* 0 - Retaliate
|
||||
* 1 - Panic
|
||||
* 2 - Retreat
|
||||
* 3 - Nothing
|
||||
*/
|
||||
void setOnFoundEnemy(int onAttack);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns an integer representing what the NPC does when it finds an enemy.
|
||||
* 0 - Retaliate
|
||||
* 1 - Panic
|
||||
* 2 - Retreat
|
||||
* 3 - Nothing
|
||||
*/
|
||||
int onFoundEnemy();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param shelterFrom An integer representing what conditions the NPC seeks shelter under.
|
||||
* 0 - Darkenss
|
||||
* 1 - Sunlight
|
||||
* 2 - Disabled
|
||||
*/
|
||||
void setShelterFrom(int shelterFrom);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns an integer representing what conditions the NPC seeks shelter under.
|
||||
* 0 - Darkenss
|
||||
* 1 - Sunlight
|
||||
* 2 - Disabled
|
||||
*/
|
||||
int getShelterFrom();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Whether the NPC has a living animation
|
||||
*/
|
||||
boolean hasLivingAnimation();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param livingAnimation True if you want the NPC to have a living animation, false otherwise
|
||||
*/
|
||||
void setLivingAnimation(boolean livingAnimation);
|
||||
|
||||
/**
|
||||
* @param type The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
|
||||
*/
|
||||
void setVisibleType(int type);
|
||||
|
||||
/**
|
||||
* @return The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
|
||||
*/
|
||||
int getVisibleType();
|
||||
|
||||
/**
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
void setVisibleTo(IPlayer player, boolean visible);
|
||||
|
||||
/**
|
||||
*
|
||||
* @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().
|
||||
*/
|
||||
boolean isVisibleTo(IPlayer player);
|
||||
|
||||
/**
|
||||
* @param type The visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
|
||||
*/
|
||||
void setShowName(int type);
|
||||
|
||||
/**
|
||||
* @return Returns the visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
|
||||
*/
|
||||
int getShowName();
|
||||
|
||||
/**
|
||||
* @return Returns the visiblity of the boss bar, 0:invisible, 1:visible, 2:when-attacking
|
||||
*/
|
||||
int getShowBossBar();
|
||||
|
||||
/**
|
||||
* @param type The visibility type of the boss bar, 0:invisible, 1:visible, 2:when-attacking
|
||||
*/
|
||||
void setShowBossBar(int type);
|
||||
|
||||
/**
|
||||
* @return The melee strength
|
||||
*/
|
||||
float getMeleeStrength();
|
||||
|
||||
/**
|
||||
* @param strength The melee strength
|
||||
*/
|
||||
void setMeleeStrength(float strength);
|
||||
|
||||
/**
|
||||
* @return The melee speed
|
||||
*/
|
||||
int getMeleeSpeed();
|
||||
|
||||
/**
|
||||
* @param speed The melee speed
|
||||
*/
|
||||
void setMeleeSpeed(int speed);
|
||||
|
||||
/**
|
||||
* @return The ranged strength
|
||||
*/
|
||||
float getRangedStrength();
|
||||
|
||||
/**
|
||||
* @param strength The ranged strength
|
||||
*/
|
||||
void setRangedStrength(float strength);
|
||||
|
||||
/**
|
||||
* @return The ranged speed
|
||||
*/
|
||||
int getRangedSpeed();
|
||||
|
||||
/**
|
||||
* @param speed The ranged speed
|
||||
*/
|
||||
void setRangedSpeed(int speed);
|
||||
|
||||
/**
|
||||
* @return The ranged burst count
|
||||
*/
|
||||
int getRangedBurst();
|
||||
|
||||
/**
|
||||
* @param count The ranged burst count
|
||||
*/
|
||||
void setRangedBurst(int count);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The amount of ticks before this entity respawns
|
||||
*/
|
||||
int getRespawnTime();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param time The new amount of ticks before this entity respawns
|
||||
*/
|
||||
void setRespawnTime(int time);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
|
||||
*/
|
||||
int getRespawnCycle();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cycle Sets when the NPC respawns. Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
|
||||
*/
|
||||
void setRespawnCycle(int cycle);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Whether the NPC is hidden when it dies
|
||||
*/
|
||||
boolean getHideKilledBody();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param hide True if the NPC is hidden when it dies. False otherwise.
|
||||
*/
|
||||
void hideKilledBody(boolean hide);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC naturally despawns.
|
||||
*/
|
||||
boolean naturallyDespawns();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param canDespawn True if the NPC should naturally despawn. False otherwise.
|
||||
*/
|
||||
void setNaturallyDespawns(boolean canDespawn);
|
||||
|
||||
/**
|
||||
* @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();
|
||||
|
||||
/**
|
||||
* @return true if npc was spawned by soul stone. becomes false after the init function is called.
|
||||
*/
|
||||
boolean isSoulStoneInit();
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* @param player The player to give the item to
|
||||
* @param item The item given to the player
|
||||
*/
|
||||
void giveItem(IPlayer player, IItemStack item);
|
||||
|
||||
|
||||
/**
|
||||
* On servers the enable-command-block option in the server.properties needs to be set to true
|
||||
* @param command The command to be executed
|
||||
*/
|
||||
void executeCommand(String command);
|
||||
|
||||
void setHeadScale(float x, float y, float z);
|
||||
|
||||
void setBodyScale(float x, float y, float z);
|
||||
|
||||
void setArmsScale(float x, float y, float z);
|
||||
|
||||
void setLegsScale(float x, float y, float z);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param resistance Explosion resistance (0-2) default is 1
|
||||
*/
|
||||
void setExplosionResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns Explosion Resistance
|
||||
*/
|
||||
float getExplosionResistance();
|
||||
|
||||
/**
|
||||
* @param resistance Melee resistance (0-2) default is 1
|
||||
*/
|
||||
void setMeleeResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @return Returns Melee Resistance
|
||||
*/
|
||||
float getMeleeResistance();
|
||||
|
||||
/**
|
||||
* @param resistance Arrow resistance (0-2) default is 1
|
||||
*/
|
||||
void setArrowResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @return Returns Arrow Resistance
|
||||
*/
|
||||
float getArrowResistance();
|
||||
|
||||
/**
|
||||
* @param resistance Knockback resistance (0-2) default is 1
|
||||
*/
|
||||
void setKnockbackResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @return Returns Knockback Resistance
|
||||
*/
|
||||
float getKnockbackResistance();
|
||||
|
||||
/**
|
||||
* @param type Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothing
|
||||
*/
|
||||
void setRetaliateType(int type);
|
||||
|
||||
/**
|
||||
* @return Returns the combat health regen per second
|
||||
*/
|
||||
float getCombatRegen();
|
||||
|
||||
/**
|
||||
* @param regen The combat health regen per second
|
||||
*/
|
||||
void setCombatRegen(float regen);
|
||||
|
||||
/**
|
||||
* @return Returns the health regen per second when not in combat
|
||||
*/
|
||||
float getHealthRegen();
|
||||
|
||||
/**
|
||||
* @param regen The health regen per second when not in combat
|
||||
*/
|
||||
void setHealthRegen(float regen);
|
||||
|
||||
long getAge();
|
||||
|
||||
ITimers getTimers();
|
||||
|
||||
void setFly(int fly);
|
||||
|
||||
boolean canFly();
|
||||
|
||||
void setFlySpeed(double flySpeed);
|
||||
|
||||
double getFlySpeed(double flySpeed);
|
||||
|
||||
void setFlyGravity(double flyGravity);
|
||||
|
||||
double getFlyGravity(double flyGravity);
|
||||
|
||||
void setFlyHeightLimit(int flyHeightLimit);
|
||||
|
||||
int getFlyHeightLimit(int flyHeightLimit);
|
||||
|
||||
void limitFlyHeight(boolean limit);
|
||||
|
||||
boolean isFlyHeightLimited(boolean limit);
|
||||
|
||||
void setSpeed(int speed);
|
||||
|
||||
int getSpeed();
|
||||
|
||||
void setSkinType(byte type);
|
||||
|
||||
byte getSkinType();
|
||||
|
||||
void setSkinUrl(String url);
|
||||
|
||||
String getSkinUrl();
|
||||
|
||||
void setCloakTexture(String cloakTexture);
|
||||
|
||||
String getCloakTexture();
|
||||
|
||||
void setOverlayTexture(String overlayTexture);
|
||||
|
||||
String getOverlayTexture();
|
||||
|
||||
IOverlayHandler getOverlays();
|
||||
|
||||
void setCollisionType(int type);
|
||||
|
||||
int getCollisionType();
|
||||
|
||||
void updateClient();
|
||||
|
||||
void updateAI();
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public interface IDBCPlayer extends IPlayer {
|
||||
|
||||
void setStat(String stat, int value);
|
||||
int getStat(String stat);
|
||||
|
||||
void addBonusAttribute(String stat, String bonusID, String operation, double attributeValue);
|
||||
void addBonusAttribute(String stat, String bonusID, String operation, double attributeValue, boolean endOfTheList);
|
||||
void addToBonusAttribute(String stat, String bonusID, String operation, double attributeValue);
|
||||
void setBonusAttribute(String stat, String bonusID, String operation, double attributeValue);
|
||||
void getBonusAttribute(String stat, String bonusID);
|
||||
void removeBonusAttribute(String stat, String bonusID);
|
||||
void clearBonusAttribute(String stat);
|
||||
|
||||
String bonusAttribute(String action, String stat, String bonusID);
|
||||
|
||||
String bonusAttribute(String action, String stat, String bonusID, String operation, double attributeValue, boolean endOfTheList);
|
||||
|
||||
void setRelease(byte release);
|
||||
byte getRelease();
|
||||
|
||||
void setBody(int body);
|
||||
int getBody();
|
||||
|
||||
void setStamina(int stamina);
|
||||
int getStamina();
|
||||
|
||||
void setKi(int ki);
|
||||
int getKi();
|
||||
|
||||
void setTP(int tp);
|
||||
int getTP();
|
||||
|
||||
void setGravity(float gravity);
|
||||
float getGravity();
|
||||
|
||||
boolean isBlocking();
|
||||
|
||||
void setHairCode(String hairCode);
|
||||
String getHairCode();
|
||||
|
||||
void setExtraCode(String extraCode);
|
||||
String getExtraCode();
|
||||
|
||||
/**
|
||||
* @param slot The DBC extra inventory slot the item stack parameter will go into:
|
||||
* 0 - Weight
|
||||
* 1 - Body
|
||||
* 2 - Head
|
||||
* 3 - 4th Vanity Slot Down to the left
|
||||
* 4 - 3rd Vanity Slot Down to the left
|
||||
* 5 - 2nd Vanity Slot Down to the left
|
||||
* 6 - 1st Vanity Slot Down to the left
|
||||
* 7 - 4th Vanity Slot Down to the right
|
||||
* 8 - 3rd Vanity Slot Down to the right
|
||||
* 9 - 2nd Vanity Slot Down to the right
|
||||
* 10 - 1st Vanity Slot Down to the right
|
||||
* @param itemStack The item stack to be set into the slot. Set to null to remove the stack in that slot.
|
||||
*/
|
||||
void setItem(IItemStack itemStack, byte slot, boolean vanity);
|
||||
IItemStack getItem(byte slot, boolean vanity);
|
||||
IItemStack[] getInventory();
|
||||
|
||||
void setForm(byte form);
|
||||
byte getForm();
|
||||
void setForm2(byte form2);
|
||||
byte getForm2();
|
||||
|
||||
void setPowerPoints(int points);
|
||||
int getPowerPoints();
|
||||
|
||||
void setAuraColor(int color);
|
||||
int getAuraColor();
|
||||
|
||||
void setFormLevel(int level);
|
||||
int getFormLevel();
|
||||
|
||||
void setSkills(String skills);
|
||||
String getSkills();
|
||||
|
||||
void setJRMCSE(String statusEffects);
|
||||
String getJRMCSE();
|
||||
|
||||
void setRace(byte race);
|
||||
int getRace();
|
||||
|
||||
void setDBCClass(byte dbcClass);
|
||||
byte getDBCClass();
|
||||
|
||||
void setPowerType(byte powerType);
|
||||
int getPowerType();
|
||||
|
||||
int getKillCount(String type);
|
||||
}
|
||||
@@ -0,0 +1,353 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.api.INbt;
|
||||
import noppes.npcs.api.IParticle;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public interface IEntity<T extends Entity> {
|
||||
|
||||
void spawnParticle(IParticle entityParticle);
|
||||
|
||||
int getEntityId();
|
||||
|
||||
String getUniqueID();
|
||||
|
||||
double getYOffset();
|
||||
|
||||
/**
|
||||
* @return The entities width
|
||||
*/
|
||||
double getWidth();
|
||||
|
||||
/**
|
||||
* @return The entities height
|
||||
*/
|
||||
double getHeight();
|
||||
|
||||
/**
|
||||
* @return The entities x position
|
||||
*/
|
||||
double getX();
|
||||
|
||||
/**
|
||||
* @param x The entities x position
|
||||
*/
|
||||
void setX(double x);
|
||||
|
||||
/**
|
||||
* @return The entities y position
|
||||
*/
|
||||
double getY();
|
||||
|
||||
/**
|
||||
* @param y The entities y position
|
||||
*/
|
||||
void setY(double y);
|
||||
|
||||
/**
|
||||
* @return The entities x position
|
||||
*/
|
||||
double getZ();
|
||||
|
||||
/**
|
||||
* @param z The entities x position
|
||||
*/
|
||||
void setZ(double z);
|
||||
|
||||
/**
|
||||
* @return The entities z motion
|
||||
*/
|
||||
double getMotionX();
|
||||
|
||||
/**
|
||||
* @param x The entities x motion
|
||||
*/
|
||||
void setMotionX(double x);
|
||||
|
||||
/**
|
||||
* @return The entities x motion
|
||||
*/
|
||||
double getMotionY();
|
||||
|
||||
/**
|
||||
* @param y The entities y motion
|
||||
*/
|
||||
void setMotionY(double y);
|
||||
|
||||
/**
|
||||
* @return The entities y motion
|
||||
*/
|
||||
double getMotionZ();
|
||||
|
||||
/**
|
||||
* @param z The entities z motion
|
||||
*/
|
||||
void setMotionZ(double z);
|
||||
|
||||
void setMotion(double x, double y, double z);
|
||||
|
||||
void setMotion(IPos pos);
|
||||
|
||||
IPos getMotion();
|
||||
|
||||
boolean isAirborne();
|
||||
|
||||
/**
|
||||
* @return The block x position
|
||||
*/
|
||||
int getBlockX();
|
||||
|
||||
/**
|
||||
* @return The block y position
|
||||
*/
|
||||
int getBlockY();
|
||||
|
||||
/**
|
||||
* @return The block z position
|
||||
*/
|
||||
int getBlockZ();
|
||||
|
||||
/**
|
||||
* @param x The x position
|
||||
* @param y The y position
|
||||
* @param z The z position
|
||||
*/
|
||||
void setPosition(double x, double y, double z);
|
||||
|
||||
void setPosition(IPos pos);
|
||||
|
||||
IPos getPosition();
|
||||
|
||||
int getDimension();
|
||||
|
||||
/**
|
||||
* @param range The search range for entities around this entity
|
||||
* @return Array of entities within range
|
||||
*/
|
||||
IEntity[] getSurroundingEntities(int range);
|
||||
|
||||
/**
|
||||
* @param range The search range for entities around this entity
|
||||
* @param type The EntityType you want to find
|
||||
* @return Array of entities within range
|
||||
*/
|
||||
IEntity[] getSurroundingEntities(int range, int type);
|
||||
|
||||
/**
|
||||
* @return Whether the entity is alive or not
|
||||
*/
|
||||
boolean isAlive();
|
||||
|
||||
/**
|
||||
* @param key Get temp data for this key
|
||||
* @return Returns the stored temp data
|
||||
*/
|
||||
Object getTempData(String key);
|
||||
|
||||
/**
|
||||
* Tempdata gets cleared when the entity gets unloaded or the world restarts
|
||||
* @param key The key for the data stored
|
||||
* @param value The data stored
|
||||
*/
|
||||
void setTempData(String key, Object value);
|
||||
|
||||
/**
|
||||
* @param key The key thats going to be tested against the temp data
|
||||
* @return Whether or not temp data containes the key
|
||||
*/
|
||||
boolean hasTempData(String key);
|
||||
|
||||
/**
|
||||
* @param key The key for the temp data to be removed
|
||||
*/
|
||||
void removeTempData(String key);
|
||||
|
||||
/**
|
||||
* Remove all tempdata
|
||||
*/
|
||||
void clearTempData();
|
||||
|
||||
/**
|
||||
* @param key The key of the data to be returned
|
||||
* @return Returns the stored data
|
||||
*/
|
||||
Object getStoredData(String key);
|
||||
|
||||
/**
|
||||
* Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved
|
||||
* @param key The key for the data stored
|
||||
* @param value The data stored. This data can be either a Number or a String. Other data is not stored
|
||||
*/
|
||||
void setStoredData(String key, Object value);
|
||||
|
||||
/**
|
||||
* @param key The key of the data to be checked
|
||||
* @return Returns whether or not the stored data contains the key
|
||||
*/
|
||||
boolean hasStoredData(String key);
|
||||
|
||||
/**
|
||||
* @param key The key of the data to be removed
|
||||
*/
|
||||
void removeStoredData(String key);
|
||||
|
||||
/**
|
||||
* Remove all stored data
|
||||
*/
|
||||
void clearStoredData();
|
||||
|
||||
/**
|
||||
* @return The age of this entity in ticks
|
||||
*/
|
||||
long getAge();
|
||||
|
||||
/**
|
||||
* Despawns this entity. Removes it permanently
|
||||
*/
|
||||
void despawn();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is standing in water
|
||||
*/
|
||||
boolean inWater();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is standing in lava
|
||||
*/
|
||||
boolean inLava();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is standing in fire
|
||||
*/
|
||||
boolean inFire();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is on fire
|
||||
*/
|
||||
boolean isBurning();
|
||||
|
||||
/**
|
||||
* @param ticks Amount of world ticks this entity will burn. 20 ticks equals 1 second
|
||||
*/
|
||||
void setBurning(int ticks);
|
||||
|
||||
/**
|
||||
* Removes fire from this entity
|
||||
*/
|
||||
void extinguish();
|
||||
|
||||
/**
|
||||
* @return Name as which it's registered in minecraft
|
||||
*/
|
||||
String getTypeName();
|
||||
|
||||
/**
|
||||
* @param item Item to be dropped
|
||||
*/
|
||||
void dropItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* @return Return the rider
|
||||
*/
|
||||
IEntity getRider();
|
||||
|
||||
/**
|
||||
* @param entity The entity to ride this entity
|
||||
*/
|
||||
void setRider(IEntity entity);
|
||||
|
||||
/**
|
||||
* @return Return the entity, this entity is riding
|
||||
*/
|
||||
IEntity getMount();
|
||||
|
||||
/**
|
||||
* @param entity The entity this entity will mount
|
||||
*/
|
||||
void setMount(IEntity entity);
|
||||
|
||||
/**
|
||||
* @see noppes.npcs.scripted.constants.EntityType
|
||||
* @return Returns the EntityType of this entity
|
||||
*/
|
||||
int getType();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param type @EntityType to check
|
||||
* @return Returns whether the entity is type of the given @EntityType
|
||||
*/
|
||||
boolean typeOf(int type);
|
||||
|
||||
/**
|
||||
* @param rotation The rotation to be set (0-360)
|
||||
*/
|
||||
void setRotation(float rotation);
|
||||
|
||||
/**
|
||||
* @return Current rotation of the npc
|
||||
*/
|
||||
float getRotation();
|
||||
|
||||
public void setPitch(float pitch);
|
||||
|
||||
public float getPitch();
|
||||
|
||||
/**
|
||||
* @param power How strong the knockback is
|
||||
* @param direction The direction in which he flies back (0-360). Usually based on getRotation()
|
||||
*/
|
||||
void knockback(int power, float direction);
|
||||
|
||||
void knockback(int xpower, int ypower, int zpower, float direction);
|
||||
void knockback(IPos pos, float direction);
|
||||
|
||||
void setImmune(int ticks);
|
||||
|
||||
public void setInvisible(boolean invisible);
|
||||
|
||||
public void setSneaking(boolean sneaking);
|
||||
|
||||
public void setSprinting(boolean sprinting);
|
||||
|
||||
boolean hasCollided();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns whether or not this entity is sneaking
|
||||
*/
|
||||
boolean isSneaking();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns whether or not this entity is sprinting
|
||||
*/
|
||||
boolean isSprinting();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* Expert users only
|
||||
* @return Returns minecrafts entity
|
||||
*/
|
||||
T getMCEntity();
|
||||
|
||||
public INbt getNbt();
|
||||
|
||||
public INbt getAllNbt();
|
||||
|
||||
public void setNbt(INbt nbt);
|
||||
|
||||
INbt getNbtOptional();
|
||||
|
||||
void storeAsClone(int tab, String name);
|
||||
|
||||
IWorld getWorld();
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
||||
public interface IEntityLiving<T extends EntityLiving> extends IEntityLivingBase<T> {
|
||||
boolean isNavigating();
|
||||
|
||||
void clearNavigation();
|
||||
|
||||
void navigateTo(double var1, double var3, double var5, double var7);
|
||||
|
||||
T getMCEntity();
|
||||
|
||||
void playLivingSound();
|
||||
|
||||
void spawnExplosionParticle();
|
||||
|
||||
void setMoveForward(float speed);
|
||||
|
||||
void faceEntity(IEntity entity, float pitch, float yaw);
|
||||
|
||||
boolean canPickUpLoot();
|
||||
|
||||
void setCanPickUpLoot(boolean pickUp);
|
||||
|
||||
boolean isPersistent();
|
||||
|
||||
void enablePersistence();
|
||||
|
||||
void setCustomNameTag(String text);
|
||||
|
||||
String getCustomNameTag();
|
||||
|
||||
boolean hasCustomNameTag();
|
||||
|
||||
void setAlwaysRenderNameTag(boolean alwaysRender);
|
||||
|
||||
boolean getAlwaysRenderNameTag();
|
||||
|
||||
void clearLeashed(boolean sendPacket, boolean dropLeash);
|
||||
|
||||
boolean allowLeashing();
|
||||
|
||||
boolean getLeashed();
|
||||
|
||||
IEntity getLeashedTo();
|
||||
|
||||
void setLeashedTo(IEntity entity, boolean sendPacket);
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import noppes.npcs.api.IBlock;
|
||||
import noppes.npcs.api.IDamageSource;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T> {
|
||||
/**
|
||||
* @return The entity's current health
|
||||
*/
|
||||
float getHealth();
|
||||
|
||||
/**
|
||||
* @param health The new health of this entity
|
||||
*/
|
||||
void setHealth(float health);
|
||||
|
||||
void hurt(float damage);
|
||||
|
||||
void hurt(float damage, IEntity source);
|
||||
|
||||
void hurt(float damage, IDamageSource damageSource);
|
||||
|
||||
/**
|
||||
* @return Entity's max health
|
||||
*/
|
||||
double getMaxHealth();
|
||||
/**
|
||||
* @return Whether or not this entity is attacking something
|
||||
*/
|
||||
boolean isAttacking();
|
||||
|
||||
/**
|
||||
* @param living Entity which this entity will attack
|
||||
*/
|
||||
void setAttackTarget(IEntityLivingBase living);
|
||||
|
||||
/**
|
||||
* @return The entity which this entity is attacking
|
||||
*/
|
||||
IEntityLivingBase getAttackTarget();
|
||||
|
||||
int getType();
|
||||
|
||||
boolean typeOf(int type);
|
||||
|
||||
/**
|
||||
* @param entity Entity to check
|
||||
* @return Whether or not this entity can see the given entity
|
||||
*/
|
||||
boolean canSeeEntity(IEntity entity);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns the look vector of this entity as an IPos object.
|
||||
*/
|
||||
IPos getLookVector();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param maxDistance The max distance to perform checks before stopping
|
||||
* @return The first block found by following along the entity's look vector.
|
||||
*/
|
||||
IBlock getLookingAtBlock(int maxDistance);
|
||||
|
||||
/**
|
||||
* Returns an IPos object corresponding to the final obstructed point following along the
|
||||
* entity's look vector. If no obstructions are found (entity is looking in a straight path of
|
||||
* air with no blocks in the way), the final position is returned.
|
||||
*
|
||||
* @param maxDistance The max distance to perform checks before stopping
|
||||
* @return The position the entity is looking at.
|
||||
*/
|
||||
IPos getLookingAtPos(int maxDistance);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param maxDistance The max distance to perform checks before stopping
|
||||
* @param range The radius to check for surrounding entities at every point on the vector
|
||||
* @return A list of entities, sorted first by closest to the entity along the look vector, then by which
|
||||
* entities are closest to the vector.
|
||||
*/
|
||||
IEntity[] getLookingAtEntities(int maxDistance, double offset, double range, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
|
||||
|
||||
IEntity[] getLookingAtEntities(int maxDistance, double offset, double range);
|
||||
|
||||
/**
|
||||
* Expert use only
|
||||
* @return Returns the minecraft entity object
|
||||
*/
|
||||
T getMCEntity();
|
||||
|
||||
/**
|
||||
* Makes the entity swing its hand
|
||||
*/
|
||||
void swingHand();
|
||||
|
||||
/**
|
||||
* Works the same as the <a href="http://minecraft.gamepedia.com/Commands#effect">/effect command</a>
|
||||
* @param effect
|
||||
* @param duration The duration in seconds
|
||||
* @param strength The amplifier of the potion effect
|
||||
* @param hideParticles Whether or not you want to hide potion particles
|
||||
*/
|
||||
void addPotionEffect(int effect, int duration, int strength, boolean hideParticles);
|
||||
|
||||
/**
|
||||
* Clears all potion effects
|
||||
*/
|
||||
void clearPotionEffects();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param effect Potion effect to check
|
||||
* @return Returns -1 if its not active. Otherwise returns the strenght of the potion
|
||||
*/
|
||||
int getPotionEffect(int effect);
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @since 1.7.10c
|
||||
* @return The item the entity is holding
|
||||
*/
|
||||
IItemStack getHeldItem();
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @since 1.7.10c
|
||||
* @param item The item to be set
|
||||
*/
|
||||
void setHeldItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @param slot Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head
|
||||
* @return The item in the given slot
|
||||
*/
|
||||
IItemStack getArmor(int slot);
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @since 1.7.10c
|
||||
* @param slot Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:head
|
||||
* @param item Item to be set
|
||||
*/
|
||||
void setArmor(int slot, IItemStack item);
|
||||
|
||||
void setAIMoveSpeed(float speed);
|
||||
|
||||
float getAIMoveSpeed();
|
||||
|
||||
void setAbsorptionAmount(float amount);
|
||||
|
||||
float getAbsorptionAmount();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
|
||||
public interface IMonster<T extends EntityMob> extends IEntityLiving<T> {
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
|
||||
public interface IPixelmon<T extends EntityTameable> extends IAnimal<T> {
|
||||
boolean getIsShiny();
|
||||
|
||||
void setIsShiny(boolean bo);
|
||||
|
||||
int getLevel();
|
||||
|
||||
void setLevel(int level);
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
int getIV(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
void setIV(int type, int value);
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
int getEV(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
void setEV(int type, int value);
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
int getStat(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
void setStat(int type, int value);
|
||||
|
||||
/**
|
||||
* @return type 0:Pygmy, 1:Runt, 2:Small, 3:Normal, 4:Huge, 5:Giant, 6:Enormous, 7:Ginormous, 8:Microscopic
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* @param type 0:Pygmy, 1:Runt, 2:Small, 3:Normal, 4:Huge, 5:Giant, 6:Enormous, 7:Ginormous, 8:Microscopic
|
||||
*/
|
||||
void setSize(int type);
|
||||
|
||||
/**
|
||||
* @return 0-255
|
||||
*/
|
||||
int getHapiness();
|
||||
|
||||
/**
|
||||
* @param value 0-255
|
||||
*/
|
||||
void setHapiness(int value);
|
||||
|
||||
/**
|
||||
* @return 0:Hardy, 1:Serious, 2:Docile, 3:Bashful, 4:Quirky, 5:Lonely, 6:Brave, 7:Adamant, 8:Naughty, 9:Bold, 10:Relaxed, 11:Impish, 12:Lax, 13:Timid, 14:Hasty, 15:Jolly, 16:Naive, 17:Modest, 18:Mild, 19:Quiet, 20:Rash, 21:Calm, 22:Gentle, 23:Sassy, 24:Careful
|
||||
*/
|
||||
int getNature();
|
||||
|
||||
/**
|
||||
* @param type 0:Hardy, 1:Serious, 2:Docile, 3:Bashful, 4:Quirky, 5:Lonely, 6:Brave, 7:Adamant, 8:Naughty, 9:Bold, 10:Relaxed, 11:Impish, 12:Lax, 13:Timid, 14:Hasty, 15:Jolly, 16:Naive, 17:Modest, 18:Mild, 19:Quiet, 20:Rash, 21:Calm, 22:Gentle, 23:Sassy, 24:Careful
|
||||
*/
|
||||
void setNature(int type);
|
||||
|
||||
/**
|
||||
* @return -1:Uncaught, 0:Pokeball, 1:GreatBall, 2:UltraBall, 3:MasterBall, 4:LevelBall, 5:MoonBall, 6:FriendBall, 7:LoveBall, 8:SafariBall, 9:HeavyBall, 10:FastBall, 11:RepeatBall, 12:TimerBall, 13:NestBall, 14:NetBall, 15:DiveBall, 16:LuxuryBall, 17:HealBall, 18:DuskBall, 19:PremierBall, 20:SportBall, 21:QuickBall, 22:ParkBall, 23:LureBall, 24:CherishBall, 25:GSBall
|
||||
*/
|
||||
int getPokeball();
|
||||
|
||||
/**
|
||||
* @param type -1:Uncaught, 0:Pokeball, 1:GreatBall, 2:UltraBall, 3:MasterBall, 4:LevelBall, 5:MoonBall, 6:FriendBall, 7:LoveBall, 8:SafariBall, 9:HeavyBall, 10:FastBall, 11:RepeatBall, 12:TimerBall, 13:NestBall, 14:NetBall, 15:DiveBall, 16:LuxuryBall, 17:HealBall, 18:DuskBall, 19:PremierBall, 20:SportBall, 21:QuickBall, 22:ParkBall, 23:LureBall, 24:CherishBall, 25:GSBall
|
||||
*/
|
||||
void setPokeball(int type);
|
||||
|
||||
String getNickname();
|
||||
|
||||
boolean hasNickname();
|
||||
|
||||
void setNickname(String name);
|
||||
|
||||
String getMove(int slot);
|
||||
|
||||
void setMove(int slot, String move);
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.api.*;
|
||||
import noppes.npcs.api.handler.IOverlayHandler;
|
||||
import noppes.npcs.api.handler.IPlayerData;
|
||||
import noppes.npcs.api.handler.data.IDialog;
|
||||
import noppes.npcs.api.handler.data.IQuest;
|
||||
import noppes.npcs.api.gui.ICustomGui;
|
||||
import noppes.npcs.api.handler.data.ISound;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.overlay.ICustomOverlay;
|
||||
|
||||
public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T> {
|
||||
/**
|
||||
* @return Returns the displayed name of the player
|
||||
*/
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
* @return Returns the players name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
void kick(String reason);
|
||||
|
||||
void setPosition(double x, double y, double z);
|
||||
void setPosition(IPos pos);
|
||||
|
||||
void setPosition(double x, double y, double z, int dimensionId);
|
||||
void setPosition(IPos pos, int dimensionId);
|
||||
void setPosition(double x, double y, double z, IWorld world);
|
||||
void setPosition(IPos pos, IWorld world);
|
||||
|
||||
void setDimension(int dimension);
|
||||
|
||||
int getHunger();
|
||||
|
||||
void setHunger(int hunger);
|
||||
|
||||
float getSaturation();
|
||||
|
||||
void setSaturation(float saturation);
|
||||
|
||||
void showDialog(IDialog dialog);
|
||||
|
||||
boolean hasReadDialog(IDialog dialog);
|
||||
|
||||
void readDialog(IDialog dialog);
|
||||
|
||||
void unreadDialog(IDialog dialog);
|
||||
|
||||
void showDialog(int id);
|
||||
|
||||
boolean hasReadDialog(int id);
|
||||
|
||||
void readDialog(int id);
|
||||
|
||||
void unreadDialog(int id);
|
||||
|
||||
boolean hasFinishedQuest(IQuest quest);
|
||||
|
||||
boolean hasActiveQuest(IQuest quest);
|
||||
|
||||
/**
|
||||
* Add the quest from active quest list
|
||||
* @param quest The quest
|
||||
*/
|
||||
void startQuest(IQuest quest);
|
||||
|
||||
/**
|
||||
* Add the quest from finished quest list
|
||||
* @param quest The quest
|
||||
*/
|
||||
void finishQuest(IQuest quest);
|
||||
/**
|
||||
* Removes the quest from active quest list
|
||||
* @param quest The quest
|
||||
*/
|
||||
void stopQuest(IQuest quest);
|
||||
|
||||
/**
|
||||
* Removes the quest from active and finished quest list
|
||||
* @param quest The quest
|
||||
*/
|
||||
void removeQuest(IQuest quest);
|
||||
|
||||
boolean hasFinishedQuest(int id);
|
||||
|
||||
boolean hasActiveQuest(int id);
|
||||
|
||||
/**
|
||||
* @param id The quest ID
|
||||
*/
|
||||
void startQuest(int id);
|
||||
|
||||
/**
|
||||
* @param id The quest ID
|
||||
*/
|
||||
void finishQuest(int id);
|
||||
/**
|
||||
* @param id The quest ID
|
||||
*/
|
||||
void stopQuest(int id);
|
||||
|
||||
/**
|
||||
* @param id The quest ID
|
||||
*/
|
||||
void removeQuest(int id);
|
||||
|
||||
IQuest[] getFinishedQuests();
|
||||
|
||||
int getType();
|
||||
|
||||
boolean typeOf(int type);
|
||||
/**
|
||||
* @param faction The faction id
|
||||
* @param points The points to increase. Use negative values to decrease
|
||||
*/
|
||||
void addFactionPoints(int faction, int points);
|
||||
|
||||
/**
|
||||
* @param faction The faction id
|
||||
* @param points The new point value for this faction
|
||||
*/
|
||||
void setFactionPoints(int faction, int points);
|
||||
|
||||
/**
|
||||
* @param faction The faction id
|
||||
* @return points
|
||||
*/
|
||||
int getFactionPoints(int faction);
|
||||
|
||||
/**
|
||||
* @param message The message you want to send. Compatible with formatting codes, which can be found on the attached link.
|
||||
* @see <a href="https://static.wikia.nocookie.net/minecraft_gamepedia/images/7/7e/Minecraft_Formatting.gif/revision/latest/scale-to-width-down/200?cb=20200828001454">Minecraft formatting codes</a>
|
||||
*
|
||||
*/
|
||||
void sendMessage(String message);
|
||||
|
||||
/**
|
||||
* @return Return gamemode. 0: Survival, 1: Creative, 2: Adventure
|
||||
*/
|
||||
int getMode();
|
||||
|
||||
/**
|
||||
* @param type The gamemode type. 0:SURVIVAL, 1:CREATIVE, 2:ADVENTURE
|
||||
*/
|
||||
void setMode(int type);
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @return Returns a IItemStack array size 36
|
||||
*/
|
||||
IItemStack[] getInventory();
|
||||
|
||||
/**
|
||||
* @param item The item to be checked
|
||||
* @param ignoreNBT Whether the item's NBT tags will be checked to be equal
|
||||
* @param ignoreDamage Whether the item's damage will be checked to be equal
|
||||
* @return How many of this item the player has
|
||||
*/
|
||||
int inventoryItemCount(IItemStack item, boolean ignoreNBT, boolean ignoreDamage);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param id The items name
|
||||
* @param damage The damage value
|
||||
* @param amount How many will be removed
|
||||
* @return True if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given or item doesnt exist
|
||||
*/
|
||||
boolean removeItem(String id, int damage, int amount);
|
||||
|
||||
/**
|
||||
* @param item The Item type to be removed
|
||||
* @param amount How many will be removed
|
||||
* @param ignoreNBT Whether the item's NBT tags will be checked to be equal
|
||||
* @param ignoreDamage Whether the item's damage will be checked to be equal
|
||||
* @return True if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given
|
||||
*/
|
||||
boolean removeItem(IItemStack item, int amount, boolean ignoreNBT, boolean ignoreDamage);
|
||||
|
||||
/**
|
||||
* @param item The item to be removed from the players inventory
|
||||
* @param ignoreNBT Whether the item's NBT tags will be checked to be equal
|
||||
* @param ignoreDamage Whether the item's damage will be checked to be equal
|
||||
* @return The amount of item stacks that were removed
|
||||
*/
|
||||
int removeAllItems(IItemStack item, boolean ignoreNBT, boolean ignoreDamage);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param item Item to be added
|
||||
* @param amount The amount of the item to be added
|
||||
* @return Returns whether or not it gave the item succesfully
|
||||
*/
|
||||
boolean giveItem(IItemStack item, int amount);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param id The items name
|
||||
* @param damage The damage value
|
||||
* @param amount The amount of the item to be added
|
||||
* @return Returns whether or not it gave the item succesfully
|
||||
*/
|
||||
boolean giveItem(String id, int damage, int amount);
|
||||
|
||||
/**
|
||||
* Same as the /spawnpoint command
|
||||
* @param x The x position
|
||||
* @param y The y position
|
||||
* @param z The z position
|
||||
*/
|
||||
void setSpawnpoint(int x, int y, int z);
|
||||
void setSpawnpoint(IPos pos);
|
||||
|
||||
void resetSpawnpoint();
|
||||
|
||||
void setRotation(float rotationYaw, float rotationPitch);
|
||||
|
||||
void disableMouseInput(long time, int... buttonIds);
|
||||
|
||||
void stopUsingItem();
|
||||
|
||||
void clearItemInUse();
|
||||
|
||||
public void clearInventory();
|
||||
|
||||
void playSound(String name, float volume, float pitch);
|
||||
|
||||
void playSound(int id, ISound sound);
|
||||
|
||||
void stopSound(int id);
|
||||
|
||||
void pauseSounds();
|
||||
|
||||
void continueSounds();
|
||||
|
||||
void stopSounds();
|
||||
|
||||
void mountEntity(Entity ridingEntity);
|
||||
|
||||
IEntity dropOneItem(boolean dropStack);
|
||||
|
||||
boolean canHarvestBlock(IBlock block);
|
||||
|
||||
boolean interactWith(IEntity entity);
|
||||
|
||||
/**
|
||||
* @param achievement The achievement id. For a complete list see http://minecraft.gamepedia.com/Achievements
|
||||
* @return Returns whether or not the player has this achievement
|
||||
*/
|
||||
boolean hasAchievement(String achievement);
|
||||
|
||||
/**
|
||||
* @param permission Bukkit/Cauldron permission
|
||||
* @return Returns whether or not the player has the permission
|
||||
*/
|
||||
boolean hasBukkitPermission(String permission);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns the exp level
|
||||
*/
|
||||
int getExpLevel();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param level The new exp level you want to set
|
||||
*/
|
||||
void setExpLevel(int level);
|
||||
|
||||
/**
|
||||
* Requires pixelmon to be installed
|
||||
* @since 1.7.10d
|
||||
*/
|
||||
IPixelmonPlayerData getPixelmonData();
|
||||
|
||||
ITimers getTimers();
|
||||
|
||||
void updatePlayerInventory();
|
||||
|
||||
IDBCPlayer getDBCPlayer();
|
||||
|
||||
boolean blocking();
|
||||
|
||||
public IPlayerData getData();
|
||||
|
||||
boolean isScriptingDev();
|
||||
|
||||
IQuest[] getActiveQuests();
|
||||
|
||||
IContainer getOpenContainer();
|
||||
|
||||
void showCustomGui(ICustomGui gui);
|
||||
|
||||
ICustomGui getCustomGui();
|
||||
|
||||
void closeGui();
|
||||
|
||||
void showCustomOverlay(ICustomOverlay overlay);
|
||||
|
||||
void closeOverlay(int id);
|
||||
|
||||
IOverlayHandler getOverlays();
|
||||
}
|
||||
Reference in new issue
Block a user