public interface ICustomNpc<T extends net.minecraft.entity.EntityCreature> extends IEntityLiving<T>
| Modifier and Type | Method and Description |
|---|---|
void |
aimWhileShooting(boolean aimWhileShooting) |
boolean |
canAimWhileShooting() |
boolean |
canBreathe() |
boolean |
canFly() |
void |
executeCommand(java.lang.String command)
On servers the enable-command-block option in the server.properties needs to be set to true
|
int |
getAccuracy() |
long |
getAge() |
IItemStack |
getArmor(int slot)
Note not all Living Entities support this
|
float |
getArrowResistance() |
boolean |
getAttackFactions() |
int |
getBurstCount() |
boolean |
getCanDrown() |
java.lang.String |
getCloakTexture() |
int |
getCollisionType() |
float |
getCombatRegen() |
boolean |
getDefendFaction() |
float |
getExplosionResistance() |
IFaction |
getFaction() |
int |
getFireRate() |
java.lang.String |
getFireSound() |
double |
getFlyGravity(double flyGravity) |
int |
getFlyHeightLimit(int flyHeightLimit) |
double |
getFlySpeed(double flySpeed) |
float |
getHealthRegen() |
boolean |
getHideKilledBody() |
IPos |
getHome() |
int |
getHomeX() |
int |
getHomeY() |
int |
getHomeZ() |
boolean |
getIgnoreCobweb() |
IJob |
getJob() |
float |
getKnockbackResistance() |
IItemStack |
getLefttItem() |
double |
getLootChance(int slot) |
IItemStack |
getLootItem(int slot) |
int |
getLootMode() |
int |
getMaxLootXP() |
int |
getMaxProjectileDelay() |
float |
getMeleeResistance() |
int |
getMeleeSpeed() |
float |
getMeleeStrength() |
int |
getMinLootXP() |
int |
getMinPointsToSoulStone()
requires SoulStoneFriendlyNPCs in config to be true
-1 by default
if -1, the minimum points are the faction's friendly points
|
int |
getMinProjectileDelay() |
int |
getModelType() |
java.lang.String |
getName() |
IOverlayHandler |
getOverlays() |
java.lang.String |
getOverlayTexture() |
IItemStack |
getProjectileItem() |
boolean |
getProjectilesKeepTerrain() |
int |
getRangedBurst() |
int |
getRangedRange() |
int |
getRangedSpeed() |
float |
getRangedStrength() |
boolean |
getRefuseSoulStone() |
int |
getRespawnCycle() |
int |
getRespawnTime() |
boolean |
getReturnToHome() |
IItemStack |
getRightItem() |
IRole |
getRole() |
int |
getRotationType() |
int |
getShelterFrom() |
int |
getShotCount() |
int |
getShowBossBar() |
int |
getShowName() |
int |
getSize() |
byte |
getSkinType() |
java.lang.String |
getSkinUrl() |
java.lang.String |
getSoulStonePlayerName() |
int |
getSpeed() |
int |
getTacticalRadius() |
int |
getTacticalVariant() |
java.lang.String |
getTacticalVariantName() |
java.lang.String |
getTexture() |
ITimers |
getTimers() |
java.lang.String |
getTitle() |
int |
getType() |
int |
getVisibleType() |
void |
giveItem(IPlayer player,
IItemStack item) |
boolean |
hasLivingAnimation() |
void |
hideKilledBody(boolean hide) |
boolean |
isFlyHeightLimited(boolean limit) |
boolean |
isSoulStoneInit() |
boolean |
isVisibleTo(IPlayer player) |
void |
kill()
Kill the npc, doesnt't despawn it
|
void |
limitFlyHeight(boolean limit) |
boolean |
naturallyDespawns() |
int |
onFoundEnemy() |
void |
reset()
Basically completely resets the npc.
|
void |
say(IPlayer player,
java.lang.String message) |
void |
say(java.lang.String message) |
void |
setAccuracy(int accuracy) |
void |
setAnimation(int type) |
void |
setArmor(int slot,
IItemStack item)
Note not all Living Entities support this
|
void |
setArmsScale(float x,
float y,
float z) |
void |
setArrowResistance(float resistance) |
void |
setAttackFactions(boolean attackOtherFactions) |
void |
setBodyScale(float x,
float y,
float z) |
void |
setBurstCount(int burstCount) |
void |
setCloakTexture(java.lang.String cloakTexture) |
void |
setCollisionType(int type) |
void |
setCombatRegen(float regen) |
void |
setDefendFaction(boolean defendFaction) |
void |
setDrowningType(int type) |
void |
setExplosionResistance(float resistance) |
void |
setFaction(int id) |
void |
setFireRate(int rate) |
void |
setFireSound(java.lang.String fireSound) |
void |
setFly(int fly) |
void |
setFlyGravity(double flyGravity) |
void |
setFlyHeightLimit(int flyHeightLimit) |
void |
setFlySpeed(double flySpeed) |
void |
setHeadScale(float x,
float y,
float z) |
void |
setHealthRegen(float regen) |
void |
setHome(int x,
int y,
int z) |
void |
setHome(IPos pos) |
void |
setHomeX(int x) |
void |
setHomeY(int y) |
void |
setHomeZ(int z) |
void |
setIgnoreCobweb(boolean ignore) |
void |
setJob(int job) |
void |
setKnockbackResistance(float resistance) |
void |
setLeftItem(IItemStack item) |
void |
setLegsScale(float x,
float y,
float z) |
void |
setLivingAnimation(boolean livingAnimation) |
void |
setLootChance(int slot,
double chance) |
void |
setLootItem(int slot,
IItemStack item) |
void |
setLootMode(int lootMode) |
void |
setMaxHealth(double health) |
void |
setMaxLootXP(int lootXP) |
void |
setMaxProjectileDelay(int maxDelay) |
void |
setMeleeResistance(float resistance) |
void |
setMeleeSpeed(int speed) |
void |
setMeleeStrength(float strength) |
void |
setMinLootXP(int lootXP) |
void |
setMinPointsToSoulStone(int points)
requires SoulStoneFriendlyNPCs in config to be true
-1 by default
if -1, the minimum points are the faction's friendly points
|
void |
setMinProjectileDelay(int minDelay) |
void |
setModelType(int modelType) |
void |
setName(java.lang.String name) |
void |
setNaturallyDespawns(boolean canDespawn) |
void |
setOnFoundEnemy(int onAttack) |
void |
setOverlayTexture(java.lang.String overlayTexture) |
void |
setProjectileItem(IItemStack item) |
void |
setProjectilesKeepTerrain(boolean b) |
void |
setRangedBurst(int count) |
void |
setRangedRange(int rangedRange) |
void |
setRangedSpeed(int speed) |
void |
setRangedStrength(float strength) |
void |
setRefuseSoulStone(boolean refuse) |
void |
setRespawnCycle(int cycle) |
void |
setRespawnTime(int time) |
void |
setRetaliateType(int type) |
void |
setReturnToHome(boolean bo) |
void |
setRightItem(IItemStack item) |
void |
setRole(int role) |
void |
setRotation(float rotation) |
void |
setRotationType(int rotationType) |
void |
setShelterFrom(int shelterFrom) |
void |
setShotCount(int shotCount) |
void |
setShowBossBar(int type) |
void |
setShowName(int type) |
void |
setSize(int size) |
void |
setSkinType(byte type) |
void |
setSkinUrl(java.lang.String url) |
void |
setSpeed(int speed) |
void |
setTacticalRadius(int tacticalRadius) |
void |
setTacticalVariant(int variant) |
void |
setTacticalVariant(java.lang.String variant) |
void |
setTexture(java.lang.String texture) |
void |
setTitle(java.lang.String title) |
void |
setVisibleTo(IPlayer player,
boolean visible) |
void |
setVisibleType(int type) |
void |
shootItem(IEntityLivingBase target,
IItemStack item,
int accuracy) |
boolean |
spawnedFromSoulStone() |
boolean |
typeOf(int type) |
void |
updateAI() |
void |
updateClient() |
allowLeashing, canPickUpLoot, clearLeashed, clearNavigation, enablePersistence, faceEntity, getAlwaysRenderNameTag, getCustomNameTag, getLeashed, getLeashedTo, getMCEntity, hasCustomNameTag, isNavigating, isPersistent, navigateTo, playLivingSound, setAlwaysRenderNameTag, setCanPickUpLoot, setCustomNameTag, setLeashedTo, setMoveForward, spawnExplosionParticleaddPotionEffect, canSeeEntity, clearPotionEffects, getAbsorptionAmount, getAIMoveSpeed, getAttackTarget, getHealth, getHeldItem, getLookingAtBlock, getLookingAtEntities, getLookingAtEntities, getLookingAtPos, getLookVector, getMaxHealth, getPotionEffect, hurt, hurt, hurt, isAttacking, setAbsorptionAmount, setAIMoveSpeed, setAttackTarget, setHealth, setHeldItem, swingHandclearStoredData, clearTempData, despawn, dropItem, extinguish, getAllNbt, getBlockX, getBlockY, getBlockZ, getDimension, getEntityId, getHeight, getMotion, getMotionX, getMotionY, getMotionZ, getMount, getNbt, getNbtOptional, getPitch, getPosition, getRider, getRotation, getStoredData, getSurroundingEntities, getSurroundingEntities, getTempData, getTypeName, getUniqueID, getWidth, getWorld, getX, getY, getYOffset, getZ, hasCollided, hasStoredData, hasTempData, inFire, inLava, inWater, isAirborne, isAlive, isBurning, isSneaking, isSprinting, knockback, knockback, knockback, removeStoredData, removeTempData, setBurning, setImmune, setInvisible, setMotion, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setPosition, setPosition, setRider, setSneaking, setSprinting, setStoredData, setTempData, setX, setY, setZ, spawnParticle, storeAsCloneint getSize()
void setSize(int size)
size - The size of the npc (1-30) default is 5int getModelType()
void setModelType(int modelType)
modelType - The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alexjava.lang.String getName()
void setRotation(float rotation)
setRotation in interface IEntity<T extends net.minecraft.entity.EntityCreature>rotation - The rotation to be set (0-360)void setRotationType(int rotationType)
int getRotationType()
void setName(java.lang.String name)
name - The name of the npcjava.lang.String getTitle()
void setTitle(java.lang.String title)
title - The title of the npcjava.lang.String getTexture()
void setTexture(java.lang.String texture)
texture - The texture of the npcIPos getHome()
int getHomeX()
void setHomeX(int x)
x - The home x positionint getHomeY()
void setHomeY(int y)
y - The home y positionint getHomeZ()
void setHomeZ(int z)
z - The home x positionvoid setHome(int x,
int y,
int z)
x - The home x positiony - The home y positionz - The home z positionvoid setHome(IPos pos)
void setMaxHealth(double health)
health - New max healthvoid setReturnToHome(boolean bo)
bo - Whether or not the npc will try to return to his home positionboolean getReturnToHome()
IFaction getFaction()
void setFaction(int id)
id - The id of the new factionvoid setAttackFactions(boolean attackOtherFactions)
attackOtherFactions - True if you want the NPC to attack other factions, false otherwise.boolean getAttackFactions()
void setDefendFaction(boolean defendFaction)
defendFaction - True if the NPC should defend faction members, false otherwise.boolean getDefendFaction()
int getType()
boolean typeOf(int type)
void shootItem(IEntityLivingBase target, IItemStack item, int accuracy)
target - The targeted npcitem - The item you want to shootaccuracy - Accuracy of the shot (0-100)void setProjectilesKeepTerrain(boolean b)
boolean getProjectilesKeepTerrain()
void say(java.lang.String message)
message - The message the npc will sayvoid say(IPlayer player, java.lang.String message)
message - The message the npc will sayvoid kill()
void reset()
IRole getRole()
void setRole(int role)
IJob getJob()
void setJob(int job)
IItemStack getRightItem()
void setRightItem(IItemStack item)
item - Item to be held in the right handIItemStack getLefttItem()
void setLeftItem(IItemStack item)
item - Item to be held in the left handIItemStack getProjectileItem()
void setProjectileItem(IItemStack item)
item - Item to be used as projectileboolean canAimWhileShooting()
void aimWhileShooting(boolean aimWhileShooting)
aimWhileShooting - Set to true if you want the NPC to aim while shooting, false otherwise.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()
java.lang.String getFireSound()
void setFireSound(java.lang.String fireSound)
fireSound - The new directory of the sound that plays when a projectile is shotIItemStack getArmor(int slot)
IEntityLivingBasegetArmor in interface IEntityLivingBase<T extends net.minecraft.entity.EntityCreature>slot - The armor slot to return. 0:head, 1:body, 2:legs, 3:bootsvoid setArmor(int slot,
IItemStack item)
IEntityLivingBasesetArmor in interface IEntityLivingBase<T extends net.minecraft.entity.EntityCreature>slot - The armor slot to set. 0:head, 1:body, 2:legs, 3:bootsitem - Item to be set as armorIItemStack getLootItem(int slot)
slot - The slot from the NPC's drop list to return (0-8)void setLootItem(int slot,
IItemStack item)
slot - The slot from the NPC's drop list to changeitem - The item the drop list slot will be changed todouble getLootChance(int slot)
slot - The slot from the NPC's drop list to return (0-8)void setLootChance(int slot,
double chance)
slot - The slot from the NPC's drop list to changechance - The new chance of dropping the item in this slotint getLootMode()
void setLootMode(int lootMode)
lootMode - The NPC's loot mode. 0 = Normal, 1 = Auto Pickupvoid setMinLootXP(int lootXP)
lootXP - The new minimum XP gained from killing the NPC. If greater than the max XP, it will be set to it.void setMaxLootXP(int lootXP)
lootXP - The new maximum XP gained from killing the NPC. If less than the min XP, it will be set to it.int getMinLootXP()
int getMaxLootXP()
boolean getCanDrown()
void setDrowningType(int type)
type - 0 - Never drowns, 1 - Drowns in water, 2 - Drowns in air (without water)boolean canBreathe()
void setAnimation(int type)
type - The AnimationTypevoid setTacticalVariant(int variant)
variant - Changes the tactical variant of the NPC.
0 - Rush
1 - Dodge
2 - Surround
3 - Hit N Run
4 - Ambush
5 - Stalk
6 - Noneint getTacticalVariant()
void setTacticalVariant(java.lang.String variant)
variant - Sets the NPC's tactical variant by name.java.lang.String getTacticalVariantName()
void setTacticalRadius(int tacticalRadius)
tacticalRadius - Sets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.int getTacticalRadius()
void setIgnoreCobweb(boolean ignore)
ignore - True if the NPC goes through cobwebsboolean getIgnoreCobweb()
void setOnFoundEnemy(int onAttack)
int onFoundEnemy()
void setShelterFrom(int shelterFrom)
shelterFrom - An integer representing what conditions the NPC seeks shelter under.
0 - Darkenss
1 - Sunlight
2 - Disabledint getShelterFrom()
boolean hasLivingAnimation()
void setLivingAnimation(boolean livingAnimation)
livingAnimation - True if you want the NPC to have a living animation, false otherwisevoid setVisibleType(int type)
type - The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visibleint getVisibleType()
void setVisibleTo(IPlayer player, boolean visible)
player - The player this NPC becomes visible/invisible tovisible - True if you want the NPC to be invisible to the player, false otherwiseboolean isVisibleTo(IPlayer player)
player - The player this NPC is visible/invisible tovoid setShowName(int type)
type - The visibility type of the name, 0:visible, 1:invisible, 2:when-attackingint getShowName()
int getShowBossBar()
void setShowBossBar(int type)
type - The visibility type of the boss bar, 0:invisible, 1:visible, 2:when-attackingfloat getMeleeStrength()
void setMeleeStrength(float strength)
strength - The melee strengthint getMeleeSpeed()
void setMeleeSpeed(int speed)
speed - The melee speedfloat getRangedStrength()
void setRangedStrength(float strength)
strength - The ranged strengthint getRangedSpeed()
void setRangedSpeed(int speed)
speed - The ranged speedint getRangedBurst()
void setRangedBurst(int count)
count - The ranged burst countint getRespawnTime()
void setRespawnTime(int time)
time - The new amount of ticks before this entity respawnsint getRespawnCycle()
void setRespawnCycle(int cycle)
cycle - Sets when the NPC respawns. Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)boolean getHideKilledBody()
void hideKilledBody(boolean hide)
hide - True if the NPC is hidden when it dies. False otherwise.boolean naturallyDespawns()
void setNaturallyDespawns(boolean canDespawn)
canDespawn - True if the NPC should naturally despawn. False otherwise.boolean spawnedFromSoulStone()
java.lang.String getSoulStonePlayerName()
boolean isSoulStoneInit()
boolean getRefuseSoulStone()
void setRefuseSoulStone(boolean refuse)
refuse - set if this npc refuses to be taken by soul stoneint getMinPointsToSoulStone()
void setMinPointsToSoulStone(int points)
points - the minimum faction points needed to soulstone this npcvoid giveItem(IPlayer player, IItemStack item)
player - The player to give the item toitem - The item given to the playervoid executeCommand(java.lang.String command)
command - The command to be executedvoid 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)
void setExplosionResistance(float resistance)
resistance - Explosion resistance (0-2) default is 1float getExplosionResistance()
void setMeleeResistance(float resistance)
resistance - Melee resistance (0-2) default is 1float getMeleeResistance()
void setArrowResistance(float resistance)
resistance - Arrow resistance (0-2) default is 1float getArrowResistance()
void setKnockbackResistance(float resistance)
resistance - Knockback resistance (0-2) default is 1float getKnockbackResistance()
void setRetaliateType(int type)
type - Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothingfloat getCombatRegen()
void setCombatRegen(float regen)
regen - The combat health regen per secondfloat getHealthRegen()
void setHealthRegen(float regen)
regen - The health regen per second when not in combatlong 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(java.lang.String url)
java.lang.String getSkinUrl()
void setCloakTexture(java.lang.String cloakTexture)
java.lang.String getCloakTexture()
void setOverlayTexture(java.lang.String overlayTexture)
java.lang.String getOverlayTexture()
IOverlayHandler getOverlays()
void setCollisionType(int type)
int getCollisionType()
void updateClient()
void updateAI()