Package noppes.npcs.api.entity
Interface ICustomNpc<T extends net.minecraft.entity.EntityCreature>
-
- All Superinterfaces:
IEntity<T>
,IEntityLiving<T>
,IEntityLivingBase<T>
public interface ICustomNpc<T extends net.minecraft.entity.EntityCreature> extends IEntityLiving<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method 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 trueint
getAccuracy()
long
getAge()
int
getAggroRange()
IAnimationData
getAnimationData()
IItemStack
getArmor(int slot)
Note not all Living Entities support thisfloat
getArrowResistance()
boolean
getAttackFactions()
ILines
getAttackLines()
int
getBurstCount()
boolean
getCanDrown()
java.lang.String
getCloakTexture()
int
getCollisionType()
int
getCombatPolicy()
java.lang.String
getCombatPolicyName()
float
getCombatRegen()
boolean
getDefendFaction()
IDialog
getDialog(int slot)
int
getDialogId(int slot)
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()
ILines
getInteractLines()
IJob
getJob()
ILines
getKilledLines()
ILines
getKillLines()
int
getKnockback()
double
getKnockbackResistance()
IItemStack
getLeftItem()
IItemStack
getLefttItem()
Was an old typedouble
getLootChance(int slot)
IItemStack
getLootItem(int slot)
int
getLootMode()
int
getMaxLootXP()
int
getMaxProjectileDelay()
int
getMeleeRange()
float
getMeleeResistance()
int
getMeleeSpeed()
double
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 pointsint
getMinProjectileDelay()
IModelData
getModelData()
int
getModelType()
int
getMovingType()
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()
double
getSpeed()
int
getSwingWarmup()
int
getTacticalRadius()
int
getTacticalVariant()
java.lang.String
getTacticalVariantName()
java.lang.String
getTexture()
ITimers
getTimers()
java.lang.String
getTitle()
int
getType()
int
getVisibleType()
ILines
getWorldLines()
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 itvoid
limitFlyHeight(boolean limit)
boolean
naturallyDespawns()
int
onFoundEnemy()
void
reset()
Basically completely resets the npc.void
say(java.lang.String message)
void
say(IPlayer player, java.lang.String message)
void
setAccuracy(int accuracy)
void
setAggroRange(int aggroRange)
void
setAnimation(int type)
void
setArmor(int slot, IItemStack item)
Note not all Living Entities support thisvoid
setArmsScale(float x, float y, float z)
Deprecated.void
setArrowResistance(float resistance)
void
setAttackFactions(boolean attackOtherFactions)
void
setBodyScale(float x, float y, float z)
Deprecated.void
setBurstCount(int burstCount)
void
setCloakTexture(java.lang.String cloakTexture)
void
setCollisionType(int type)
void
setCombatPolicy(int policy)
void
setCombatPolicy(java.lang.String policy)
void
setCombatRegen(float regen)
void
setDefendFaction(boolean defendFaction)
void
setDialog(int slot, int dialogId)
void
setDialog(int slot, IDialog dialog)
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)
Deprecated.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
setKnockback(int knockback)
void
setKnockbackResistance(double resistance)
void
setLeftItem(IItemStack item)
void
setLegsScale(float x, float y, float z)
Deprecated.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
setMeleeRange(int range)
void
setMeleeResistance(float resistance)
void
setMeleeSpeed(int speed)
void
setMeleeStrength(double 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 pointsvoid
setMinProjectileDelay(int minDelay)
void
setModelType(int modelType)
void
setMovingType(int movingType)
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(double speed)
void
setSwingWarmup(int ticks)
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()
-
Methods inherited from interface noppes.npcs.api.entity.IEntity
capturesDrops, clearStoredData, clearTempData, despawn, dropItem, extinguish, getAllNbt, getBlockX, getBlockY, getBlockZ, getCapturedDrops, getDimension, getEntityId, getHeight, getMotion, getMotionX, getMotionY, getMotionZ, getMount, getNbt, getNbtOptional, getPitch, getPosition, getRider, getRotation, getStoredData, getStoredDataKeys, getSurroundingEntities, getSurroundingEntities, getTempData, getTempDataKeys, getTypeName, getUniqueID, getWidth, getWorld, getX, getY, getYOffset, getZ, hasCollided, hasCollidedHorizontally, hasCollidedVertically, hasStoredData, hasTempData, inFire, inLava, inWater, isAirborne, isAlive, isBurning, isSneaking, isSprinting, knockback, knockback, knockback, removeStoredData, removeTempData, setBurning, setCapturedDrops, setCapturesDrops, setDimension, setImmune, setInvisible, setMotion, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setPosition, setPosition, setRider, setRotation, setSneaking, setSprinting, setStoredData, setTempData, setX, setY, setZ, spawnParticle, storeAsClone, updateEntity
-
Methods inherited from interface noppes.npcs.api.entity.IEntityLiving
allowLeashing, canBeSteered, canPickUpLoot, clearLeashed, clearNavigation, enablePersistence, faceEntity, getAlwaysRenderNameTag, getCustomNameTag, getLeashed, getLeashedTo, getMCEntity, hasCustomNameTag, isNavigating, isPersistent, navigateTo, playLivingSound, setAlwaysRenderNameTag, setCanPickUpLoot, setCustomNameTag, setLeashedTo, setMoveForward, spawnExplosionParticle
-
Methods inherited from interface noppes.npcs.api.entity.IEntityLivingBase
addPotionEffect, canBreatheUnderwater, canSeeEntity, clearPotionEffects, dismountEntity, getAbsorptionAmount, getAIMoveSpeed, getArrowCountInEntity, getAttackTarget, getAttackTargetTime, getFollowRange, getHealth, getHeldItem, getLastAttacker, getLastAttackerTime, getLookingAtBlock, getLookingAtBlock, getLookingAtEntities, getLookingAtEntities, getLookingAtEntities, getLookingAtPos, getLookingAtPos, getLookVector, getMaxHealth, getPotionEffect, getTotalArmorValue, hurt, hurt, hurt, isAttacking, isChild, isOnLadder, renderBrokenItemStack, setAbsorptionAmount, setAIMoveSpeed, setArrowCountInEntity, setAttackTarget, setFollowRange, setHealth, setHeldItem, setLastAttacker, setMaxHurtTime, setMaxHurtTime, swingHand
-
-
-
-
Method Detail
-
getSize
int getSize()
- Returns:
- Returns the current npcs size 1-30
-
setSize
void setSize(int size)
- Parameters:
size
- The size of the npc (1-30) default is 5
-
getModelType
int getModelType()
- Returns:
- Returns the current npcs modelType of the NPC
-
setModelType
void setModelType(int modelType)
- Parameters:
modelType
- The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
-
getName
java.lang.String getName()
- Returns:
- The npcs name
-
setRotation
void setRotation(float rotation)
- Specified by:
setRotation
in interfaceIEntity<T extends net.minecraft.entity.EntityCreature>
- Parameters:
rotation
- The rotation to be set (0-360)
-
setRotationType
void setRotationType(int rotationType)
-
getRotationType
int getRotationType()
-
setMovingType
void setMovingType(int movingType)
- Parameters:
movingType
- The moving type of the npc. 0 = standing, 1 = wandering, 2 = moving path
-
getMovingType
int getMovingType()
- Returns:
- The moving type of the npc. 0 = standing, 1 = wandering, 2 = moving path
-
setName
void setName(java.lang.String name)
- Parameters:
name
- The name of the npc
-
getTitle
java.lang.String getTitle()
- Returns:
- The npcs title
- Since:
- 1.7.10
-
setTitle
void setTitle(java.lang.String title)
- Parameters:
title
- The title of the npc- Since:
- 1.7.10
-
getTexture
java.lang.String getTexture()
- Returns:
- The npcs texture
-
setTexture
void setTexture(java.lang.String texture)
- Parameters:
texture
- The texture of the npc
-
getHome
IPos getHome()
-
getHomeX
int getHomeX()
- Returns:
- Home position x
-
setHomeX
void setHomeX(int x)
- Parameters:
x
- The home x position
-
getHomeY
int getHomeY()
- Returns:
- Home position x
-
setHomeY
void setHomeY(int y)
- Parameters:
y
- The home y position
-
getHomeZ
int getHomeZ()
- Returns:
- Home position x
-
setHomeZ
void setHomeZ(int z)
- Parameters:
z
- The home x position
-
setHome
void setHome(int x, int y, int z)
- Parameters:
x
- The home x positiony
- The home y positionz
- The home z position
-
setHome
void setHome(IPos pos)
-
setMaxHealth
void setMaxHealth(double health)
- Specified by:
setMaxHealth
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
health
- New max health
-
setReturnToHome
void setReturnToHome(boolean bo)
- Parameters:
bo
- Whether or not the npc will try to return to his home position
-
getReturnToHome
boolean getReturnToHome()
- Returns:
- Whether or not the npc returns home
-
getFaction
IFaction getFaction()
- Returns:
- The faction of the npc
-
setFaction
void setFaction(int id)
- Parameters:
id
- The id of the new faction
-
setAttackFactions
void setAttackFactions(boolean attackOtherFactions)
- Parameters:
attackOtherFactions
- True if you want the NPC to attack other factions, false otherwise.
-
getAttackFactions
boolean getAttackFactions()
- Returns:
- Returns true if the NPC attacks other factions, false otherwise.
-
setDefendFaction
void setDefendFaction(boolean defendFaction)
- Parameters:
defendFaction
- True if the NPC should defend faction members, false otherwise.
-
getDefendFaction
boolean getDefendFaction()
- Returns:
- Returns true if the NPC should defend faction members, false otherwise.
-
getType
int getType()
-
typeOf
boolean typeOf(int type)
-
shootItem
void shootItem(IEntityLivingBase target, IItemStack item, int accuracy)
- Parameters:
target
- The targeted npcitem
- The item you want to shootaccuracy
- Accuracy of the shot (0-100)
-
setProjectilesKeepTerrain
void setProjectilesKeepTerrain(boolean b)
-
getProjectilesKeepTerrain
boolean getProjectilesKeepTerrain()
-
say
void say(java.lang.String message)
- Parameters:
message
- The message the npc will say
-
say
void say(IPlayer player, java.lang.String message)
- Parameters:
message
- The message the npc will say
-
getDialog
IDialog getDialog(int slot)
-
getDialogId
int getDialogId(int slot)
-
setDialog
void setDialog(int slot, IDialog dialog)
-
setDialog
void setDialog(int slot, int dialogId)
-
getInteractLines
ILines getInteractLines()
-
getWorldLines
ILines getWorldLines()
-
getAttackLines
ILines getAttackLines()
-
getKilledLines
ILines getKilledLines()
-
getKillLines
ILines getKillLines()
-
kill
void kill()
Kill the npc, doesnt't despawn it
-
reset
void reset()
Basically completely resets the npc. This will also call the Init script
-
getAnimationData
IAnimationData getAnimationData()
-
getRole
IRole getRole()
- Returns:
- Returns the npcs current role
-
setRole
void setRole(int role)
-
getJob
IJob getJob()
- Returns:
- Returns the npcs current job
-
setJob
void setJob(int job)
-
getRightItem
IItemStack getRightItem()
- Returns:
- The item held in the right hand
-
setRightItem
void setRightItem(IItemStack item)
- Parameters:
item
- Item to be held in the right hand
-
getLefttItem
IItemStack getLefttItem()
Was an old type- Returns:
- The item held in the left hand
-
getLeftItem
IItemStack getLeftItem()
- Returns:
- The item held in the left hand
-
setLeftItem
void setLeftItem(IItemStack item)
- Parameters:
item
- Item to be held in the left hand
-
getProjectileItem
IItemStack getProjectileItem()
- Returns:
- Returns the projectile the npc uses
-
setProjectileItem
void setProjectileItem(IItemStack item)
- Parameters:
item
- Item to be used as projectile
-
canAimWhileShooting
boolean canAimWhileShooting()
- Returns:
- Returns true if the NPC can aim while shooting.
-
aimWhileShooting
void aimWhileShooting(boolean aimWhileShooting)
- Parameters:
aimWhileShooting
- Set to true if you want the NPC to aim while shooting, false otherwise.
-
setMinProjectileDelay
void setMinProjectileDelay(int minDelay)
-
getMinProjectileDelay
int getMinProjectileDelay()
-
setMaxProjectileDelay
void setMaxProjectileDelay(int maxDelay)
-
getMaxProjectileDelay
int getMaxProjectileDelay()
-
setRangedRange
void setRangedRange(int rangedRange)
-
getRangedRange
int getRangedRange()
-
setFireRate
void setFireRate(int rate)
-
getFireRate
int getFireRate()
-
setBurstCount
void setBurstCount(int burstCount)
-
getBurstCount
int getBurstCount()
-
setShotCount
void setShotCount(int shotCount)
-
getShotCount
int getShotCount()
-
setAccuracy
void setAccuracy(int accuracy)
-
getAccuracy
int getAccuracy()
-
getFireSound
java.lang.String getFireSound()
- Returns:
- The directory of the sound that plays when a projectile is shot
-
setFireSound
void setFireSound(java.lang.String fireSound)
- Parameters:
fireSound
- The new directory of the sound that plays when a projectile is shot
-
getArmor
IItemStack getArmor(int slot)
Description copied from interface:IEntityLivingBase
Note not all Living Entities support this- Specified by:
getArmor
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
slot
- The armor slot to return. 0:head, 1:body, 2:legs, 3:boots- Returns:
- Returns the worn armor in slot
-
setArmor
void setArmor(int slot, IItemStack item)
Description copied from interface:IEntityLivingBase
Note not all Living Entities support this- Specified by:
setArmor
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
slot
- The armor slot to set. 0:head, 1:body, 2:legs, 3:bootsitem
- Item to be set as armor
-
getLootItem
IItemStack getLootItem(int slot)
- Parameters:
slot
- The slot from the NPC's drop list to return (0-8)- Returns:
- The item in the NPC's drop list slot
-
setLootItem
void setLootItem(int slot, IItemStack item)
- Parameters:
slot
- The slot from the NPC's drop list to changeitem
- The item the drop list slot will be changed to
-
getLootChance
double getLootChance(int slot)
- Parameters:
slot
- The slot from the NPC's drop list to return (0-8)- Returns:
- The chance of dropping the item in this slot. Returns 100 if the slot is not found.
-
setLootChance
void setLootChance(int slot, double chance)
- Parameters:
slot
- The slot from the NPC's drop list to changechance
- The new chance of dropping the item in this slot
-
getLootMode
int getLootMode()
- Returns:
- The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
-
setLootMode
void setLootMode(int lootMode)
- Parameters:
lootMode
- The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
-
setMinLootXP
void setMinLootXP(int lootXP)
- Parameters:
lootXP
- The new minimum XP gained from killing the NPC. If greater than the max XP, it will be set to it.
-
setMaxLootXP
void setMaxLootXP(int lootXP)
- Parameters:
lootXP
- The new maximum XP gained from killing the NPC. If less than the min XP, it will be set to it.
-
getMinLootXP
int getMinLootXP()
- Returns:
- The minimum XP gained from killing the NPC.
-
getMaxLootXP
int getMaxLootXP()
- Returns:
- The maximum XP gained from killing the NPC.
-
getCanDrown
boolean getCanDrown()
-
setDrowningType
void setDrowningType(int type)
- Parameters:
type
- 0 - Never drowns, 1 - Drowns in water, 2 - Drowns in air (without water)
-
canBreathe
boolean canBreathe()
-
setAnimation
void setAnimation(int type)
- Parameters:
type
- The AnimationType
-
setTacticalVariant
void setTacticalVariant(int variant)
- Parameters:
variant
- Changes the tactical variant of the NPC. 0 - Rush 1 - Dodge 2 - Surround 3 - Hit N Run 4 - Ambush 5 - Stalk 6 - None
-
getTacticalVariant
int getTacticalVariant()
- Returns:
- Returns the tactical variant of the NPC. 0 - Rush 1 - Dodge 2 - Surround 3 - Hit N Run 4 - Ambush 5 - Stalk 6 - None
-
setTacticalVariant
void setTacticalVariant(java.lang.String variant)
- Parameters:
variant
- Sets the NPC's tactical variant by name.
-
getTacticalVariantName
java.lang.String getTacticalVariantName()
- Returns:
- Returns the name of the NPc's tactical variant.
-
getCombatPolicyName
java.lang.String getCombatPolicyName()
- Returns:
- Returns the name of the NPC's combat policy.
-
setCombatPolicy
void setCombatPolicy(int policy)
- Parameters:
policy
- Changes the combat policy of the NPC. 0 - Flip 1 - Brute 2 - Stubborn 4 - Tactical
-
getCombatPolicy
int getCombatPolicy()
- Returns:
- Returns the ombat policy of the NPC. 0 - Flip 1 - Brute 2 - Stubborn 3 - Tactical
-
setCombatPolicy
void setCombatPolicy(java.lang.String policy)
- Parameters:
policy
- Sets the NPC's tactical variant by name.
-
setTacticalRadius
void setTacticalRadius(int tacticalRadius)
- Parameters:
tacticalRadius
- Sets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
-
getTacticalRadius
int getTacticalRadius()
- Returns:
- Gets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
-
setIgnoreCobweb
void setIgnoreCobweb(boolean ignore)
- Parameters:
ignore
- True if the NPC goes through cobwebs
-
getIgnoreCobweb
boolean getIgnoreCobweb()
- Returns:
- True if the NPC goes through cobwebs
-
setOnFoundEnemy
void setOnFoundEnemy(int onAttack)
-
onFoundEnemy
int onFoundEnemy()
- Returns:
- Returns an integer representing what the NPC does when it finds an enemy. 0 - Retaliate 1 - Panic 2 - Retreat 3 - Nothing
-
setShelterFrom
void setShelterFrom(int shelterFrom)
- Parameters:
shelterFrom
- An integer representing what conditions the NPC seeks shelter under. 0 - Darkenss 1 - Sunlight 2 - Disabled
-
getShelterFrom
int getShelterFrom()
- Returns:
- Returns an integer representing what conditions the NPC seeks shelter under. 0 - Darkenss 1 - Sunlight 2 - Disabled
-
hasLivingAnimation
boolean hasLivingAnimation()
- Returns:
- Whether the NPC has a living animation
-
setLivingAnimation
void setLivingAnimation(boolean livingAnimation)
- Parameters:
livingAnimation
- True if you want the NPC to have a living animation, false otherwise
-
setVisibleType
void setVisibleType(int type)
- Parameters:
type
- The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
-
getVisibleType
int getVisibleType()
- Returns:
- The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
-
setVisibleTo
void setVisibleTo(IPlayer player, boolean visible)
- Parameters:
player
- The player this NPC becomes visible/invisible tovisible
- True if you want the NPC to be invisible to the player, false otherwise
-
isVisibleTo
boolean isVisibleTo(IPlayer player)
- Parameters:
player
- The player this NPC is visible/invisible to- Returns:
- 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().
-
setShowName
void setShowName(int type)
- Parameters:
type
- The visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
-
getShowName
int getShowName()
- Returns:
- Returns the visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
-
getShowBossBar
int getShowBossBar()
- Returns:
- Returns the visiblity of the boss bar, 0:invisible, 1:visible, 2:when-attacking
-
setShowBossBar
void setShowBossBar(int type)
- Parameters:
type
- The visibility type of the boss bar, 0:invisible, 1:visible, 2:when-attacking
-
getMeleeStrength
double getMeleeStrength()
- Specified by:
getMeleeStrength
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Returns:
- The melee strength
-
setMeleeStrength
void setMeleeStrength(double strength)
- Specified by:
setMeleeStrength
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
strength
- The melee strength
-
getMeleeSpeed
int getMeleeSpeed()
- Returns:
- The melee speed
-
setMeleeSpeed
void setMeleeSpeed(int speed)
- Parameters:
speed
- The melee speed
-
getMeleeRange
int getMeleeRange()
- Returns:
- The melee range
-
setMeleeRange
void setMeleeRange(int range)
- Parameters:
range
- The melee range
-
getSwingWarmup
int getSwingWarmup()
- Returns:
- The swing warmup time in ticks
-
setSwingWarmup
void setSwingWarmup(int ticks)
- Parameters:
ticks
- The amount of time before damage to swing arm
-
getKnockback
int getKnockback()
- Returns:
- The knockback strength
-
setKnockback
void setKnockback(int knockback)
- Parameters:
knockback
- The melee range
-
getAggroRange
int getAggroRange()
- Returns:
- The aggro range
-
setAggroRange
void setAggroRange(int aggroRange)
- Parameters:
aggroRange
- The new aggro range
-
getRangedStrength
float getRangedStrength()
- Returns:
- The ranged strength
-
setRangedStrength
void setRangedStrength(float strength)
- Parameters:
strength
- The ranged strength
-
getRangedSpeed
int getRangedSpeed()
- Returns:
- The ranged speed
-
setRangedSpeed
void setRangedSpeed(int speed)
- Parameters:
speed
- The ranged speed
-
getRangedBurst
int getRangedBurst()
- Returns:
- The ranged burst count
-
setRangedBurst
void setRangedBurst(int count)
- Parameters:
count
- The ranged burst count
-
getRespawnTime
int getRespawnTime()
- Returns:
- The amount of ticks before this entity respawns
-
setRespawnTime
void setRespawnTime(int time)
- Parameters:
time
- The new amount of ticks before this entity respawns
-
getRespawnCycle
int getRespawnCycle()
- Returns:
- Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
-
setRespawnCycle
void setRespawnCycle(int cycle)
- Parameters:
cycle
- Sets when the NPC respawns. Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
-
getHideKilledBody
boolean getHideKilledBody()
- Returns:
- Whether the NPC is hidden when it dies
-
hideKilledBody
void hideKilledBody(boolean hide)
- Parameters:
hide
- True if the NPC is hidden when it dies. False otherwise.
-
naturallyDespawns
boolean naturallyDespawns()
- Returns:
- Returns true if the NPC naturally despawns.
-
setNaturallyDespawns
void setNaturallyDespawns(boolean canDespawn)
- Parameters:
canDespawn
- True if the NPC should naturally despawn. False otherwise.
-
spawnedFromSoulStone
boolean spawnedFromSoulStone()
- Returns:
- true if this npc was spawned by a player using soulstone
-
getSoulStonePlayerName
java.lang.String getSoulStonePlayerName()
- Returns:
- the name of the player who spawned this npc using soulstone. null if not spawned by soulstone
-
isSoulStoneInit
boolean isSoulStoneInit()
- Returns:
- true if npc was spawned by soul stone. becomes false after the init function is called.
-
getRefuseSoulStone
boolean getRefuseSoulStone()
- Returns:
- does this npc refuse to be taken by soul stone
-
setRefuseSoulStone
void setRefuseSoulStone(boolean refuse)
- Parameters:
refuse
- set if this npc refuses to be taken by soul stone
-
getMinPointsToSoulStone
int getMinPointsToSoulStone()
requires SoulStoneFriendlyNPCs in config to be true -1 by default if -1, the minimum points are the faction's friendly points- Returns:
- the minimum faction points needed to soulstone this npc
-
setMinPointsToSoulStone
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- Parameters:
points
- the minimum faction points needed to soulstone this npc
-
giveItem
void giveItem(IPlayer player, IItemStack item)
- Parameters:
player
- The player to give the item toitem
- The item given to the player
-
executeCommand
void executeCommand(java.lang.String command)
On servers the enable-command-block option in the server.properties needs to be set to true- Parameters:
command
- The command to be executed
-
getModelData
IModelData getModelData()
-
setHeadScale
@Deprecated void setHeadScale(float x, float y, float z)
Deprecated.
-
setBodyScale
@Deprecated void setBodyScale(float x, float y, float z)
Deprecated.
-
setArmsScale
@Deprecated void setArmsScale(float x, float y, float z)
Deprecated.
-
setLegsScale
@Deprecated void setLegsScale(float x, float y, float z)
Deprecated.
-
setExplosionResistance
void setExplosionResistance(float resistance)
- Parameters:
resistance
- Explosion resistance (0-2) default is 1- Since:
- 1.7.10c
-
getExplosionResistance
float getExplosionResistance()
- Returns:
- Returns Explosion Resistance
- Since:
- 1.7.10c
-
setMeleeResistance
void setMeleeResistance(float resistance)
- Parameters:
resistance
- Melee resistance (0-2) default is 1
-
getMeleeResistance
float getMeleeResistance()
- Returns:
- Returns Melee Resistance
-
setArrowResistance
void setArrowResistance(float resistance)
- Parameters:
resistance
- Arrow resistance (0-2) default is 1
-
getArrowResistance
float getArrowResistance()
- Returns:
- Returns Arrow Resistance
-
setKnockbackResistance
void setKnockbackResistance(double resistance)
- Specified by:
setKnockbackResistance
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
resistance
- Knockback resistance (0-2) default is 1
-
getKnockbackResistance
double getKnockbackResistance()
- Specified by:
getKnockbackResistance
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Returns:
- Returns Knockback Resistance
-
setRetaliateType
void setRetaliateType(int type)
- Parameters:
type
- Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothing
-
getCombatRegen
float getCombatRegen()
- Returns:
- Returns the combat health regen per second
-
setCombatRegen
void setCombatRegen(float regen)
- Parameters:
regen
- The combat health regen per second
-
getHealthRegen
float getHealthRegen()
- Returns:
- Returns the health regen per second when not in combat
-
setHealthRegen
void setHealthRegen(float regen)
- Parameters:
regen
- The health regen per second when not in combat
-
getAge
long getAge()
-
getTimers
ITimers getTimers()
-
setFly
void setFly(int fly)
-
canFly
boolean canFly()
-
setFlySpeed
void setFlySpeed(double flySpeed)
-
getFlySpeed
double getFlySpeed(double flySpeed)
-
setFlyGravity
void setFlyGravity(double flyGravity)
-
getFlyGravity
double getFlyGravity(double flyGravity)
-
setFlyHeightLimit
void setFlyHeightLimit(int flyHeightLimit)
-
getFlyHeightLimit
int getFlyHeightLimit(int flyHeightLimit)
-
limitFlyHeight
void limitFlyHeight(boolean limit)
-
isFlyHeightLimited
boolean isFlyHeightLimited(boolean limit)
-
setSpeed
void setSpeed(double speed)
- Specified by:
setSpeed
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
-
getSpeed
double getSpeed()
- Specified by:
getSpeed
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
-
setSkinType
void setSkinType(byte type)
-
getSkinType
byte getSkinType()
-
setSkinUrl
void setSkinUrl(java.lang.String url)
-
getSkinUrl
java.lang.String getSkinUrl()
-
setCloakTexture
void setCloakTexture(java.lang.String cloakTexture)
-
getCloakTexture
java.lang.String getCloakTexture()
-
setOverlayTexture
void setOverlayTexture(java.lang.String overlayTexture)
-
getOverlayTexture
java.lang.String getOverlayTexture()
-
getOverlays
IOverlayHandler getOverlays()
-
setCollisionType
void setCollisionType(int type)
-
getCollisionType
int getCollisionType()
-
updateClient
void updateClient()
-
updateAI
void updateAI()
-
-