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 voidaimWhileShooting(boolean aimWhileShooting)booleancanAimWhileShooting()booleancanBreathe()booleancanFly()voidexecuteCommand(java.lang.String command)On servers the enable-command-block option in the server.properties needs to be set to trueintgetAccuracy()longgetAge()intgetAggroRange()IAnimationDatagetAnimationData()IItemStackgetArmor(int slot)Note not all Living Entities support thisfloatgetArrowResistance()booleangetAttackFactions()ILinesgetAttackLines()intgetBurstCount()booleangetCanDrown()java.lang.StringgetCloakTexture()intgetCollisionType()intgetCombatPolicy()java.lang.StringgetCombatPolicyName()floatgetCombatRegen()booleangetDefendFaction()IDialoggetDialog(int slot)intgetDialogId(int slot)floatgetExplosionResistance()IFactiongetFaction()intgetFireRate()java.lang.StringgetFireSound()doublegetFlyGravity(double flyGravity)intgetFlyHeightLimit(int flyHeightLimit)doublegetFlySpeed(double flySpeed)floatgetHealthRegen()booleangetHideKilledBody()IPosgetHome()intgetHomeX()intgetHomeY()intgetHomeZ()booleangetIgnoreCobweb()ILinesgetInteractLines()IJobgetJob()ILinesgetKilledLines()ILinesgetKillLines()intgetKnockback()doublegetKnockbackResistance()IItemStackgetLeftItem()IItemStackgetLefttItem()Was an old typedoublegetLootChance(int slot)IItemStackgetLootItem(int slot)intgetLootMode()intgetMaxLootXP()intgetMaxProjectileDelay()intgetMeleeRange()floatgetMeleeResistance()intgetMeleeSpeed()doublegetMeleeStrength()intgetMinLootXP()intgetMinPointsToSoulStone()requires SoulStoneFriendlyNPCs in config to be true -1 by default if -1, the minimum points are the faction's friendly pointsintgetMinProjectileDelay()IModelDatagetModelData()intgetModelType()intgetMovingType()java.lang.StringgetName()IOverlayHandlergetOverlays()java.lang.StringgetOverlayTexture()IItemStackgetProjectileItem()booleangetProjectilesKeepTerrain()intgetRangedBurst()intgetRangedRange()intgetRangedSpeed()floatgetRangedStrength()booleangetRefuseSoulStone()intgetRespawnCycle()intgetRespawnTime()booleangetReturnToHome()IItemStackgetRightItem()IRolegetRole()intgetRotationType()intgetShelterFrom()intgetShotCount()intgetShowBossBar()intgetShowName()intgetSize()bytegetSkinType()java.lang.StringgetSkinUrl()java.lang.StringgetSoulStonePlayerName()doublegetSpeed()intgetSwingWarmup()intgetTacticalRadius()intgetTacticalVariant()java.lang.StringgetTacticalVariantName()java.lang.StringgetTexture()ITimersgetTimers()java.lang.StringgetTitle()intgetType()intgetVisibleType()ILinesgetWorldLines()voidgiveItem(IPlayer player, IItemStack item)booleanhasLivingAnimation()voidhideKilledBody(boolean hide)booleanisFlyHeightLimited(boolean limit)booleanisSoulStoneInit()booleanisVisibleTo(IPlayer player)voidkill()Kill the npc, doesnt't despawn itvoidlimitFlyHeight(boolean limit)booleannaturallyDespawns()intonFoundEnemy()voidreset()Basically completely resets the npc.voidsay(java.lang.String message)voidsay(IPlayer player, java.lang.String message)voidsetAccuracy(int accuracy)voidsetAggroRange(int aggroRange)voidsetAnimation(int type)voidsetArmor(int slot, IItemStack item)Note not all Living Entities support thisvoidsetArmsScale(float x, float y, float z)Deprecated.voidsetArrowResistance(float resistance)voidsetAttackFactions(boolean attackOtherFactions)voidsetBodyScale(float x, float y, float z)Deprecated.voidsetBurstCount(int burstCount)voidsetCloakTexture(java.lang.String cloakTexture)voidsetCollisionType(int type)voidsetCombatPolicy(int policy)voidsetCombatPolicy(java.lang.String policy)voidsetCombatRegen(float regen)voidsetDefendFaction(boolean defendFaction)voidsetDialog(int slot, int dialogId)voidsetDialog(int slot, IDialog dialog)voidsetDrowningType(int type)voidsetExplosionResistance(float resistance)voidsetFaction(int id)voidsetFireRate(int rate)voidsetFireSound(java.lang.String fireSound)voidsetFly(int fly)voidsetFlyGravity(double flyGravity)voidsetFlyHeightLimit(int flyHeightLimit)voidsetFlySpeed(double flySpeed)voidsetHeadScale(float x, float y, float z)Deprecated.voidsetHealthRegen(float regen)voidsetHome(int x, int y, int z)voidsetHome(IPos pos)voidsetHomeX(int x)voidsetHomeY(int y)voidsetHomeZ(int z)voidsetIgnoreCobweb(boolean ignore)voidsetJob(int job)voidsetKnockback(int knockback)voidsetKnockbackResistance(double resistance)voidsetLeftItem(IItemStack item)voidsetLegsScale(float x, float y, float z)Deprecated.voidsetLivingAnimation(boolean livingAnimation)voidsetLootChance(int slot, double chance)voidsetLootItem(int slot, IItemStack item)voidsetLootMode(int lootMode)voidsetMaxHealth(double health)voidsetMaxLootXP(int lootXP)voidsetMaxProjectileDelay(int maxDelay)voidsetMeleeRange(int range)voidsetMeleeResistance(float resistance)voidsetMeleeSpeed(int speed)voidsetMeleeStrength(double strength)voidsetMinLootXP(int lootXP)voidsetMinPointsToSoulStone(int points)requires SoulStoneFriendlyNPCs in config to be true -1 by default if -1, the minimum points are the faction's friendly pointsvoidsetMinProjectileDelay(int minDelay)voidsetModelType(int modelType)voidsetMovingType(int movingType)voidsetName(java.lang.String name)voidsetNaturallyDespawns(boolean canDespawn)voidsetOnFoundEnemy(int onAttack)voidsetOverlayTexture(java.lang.String overlayTexture)voidsetProjectileItem(IItemStack item)voidsetProjectilesKeepTerrain(boolean b)voidsetRangedBurst(int count)voidsetRangedRange(int rangedRange)voidsetRangedSpeed(int speed)voidsetRangedStrength(float strength)voidsetRefuseSoulStone(boolean refuse)voidsetRespawnCycle(int cycle)voidsetRespawnTime(int time)voidsetRetaliateType(int type)voidsetReturnToHome(boolean bo)voidsetRightItem(IItemStack item)voidsetRole(int role)voidsetRotation(float rotation)voidsetRotationType(int rotationType)voidsetShelterFrom(int shelterFrom)voidsetShotCount(int shotCount)voidsetShowBossBar(int type)voidsetShowName(int type)voidsetSize(int size)voidsetSkinType(byte type)voidsetSkinUrl(java.lang.String url)voidsetSpeed(double speed)voidsetSwingWarmup(int ticks)voidsetTacticalRadius(int tacticalRadius)voidsetTacticalVariant(int variant)voidsetTacticalVariant(java.lang.String variant)voidsetTexture(java.lang.String texture)voidsetTitle(java.lang.String title)voidsetVisibleTo(IPlayer player, boolean visible)voidsetVisibleType(int type)voidshootItem(IEntityLivingBase target, IItemStack item, int accuracy)booleanspawnedFromSoulStone()booleantypeOf(int type)voidupdateAI()voidupdateClient()-
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:
setRotationin 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:
setMaxHealthin 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:IEntityLivingBaseNote not all Living Entities support this- Specified by:
getArmorin 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:IEntityLivingBaseNote not all Living Entities support this- Specified by:
setArmorin 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:
getMeleeStrengthin interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>- Returns:
- The melee strength
-
setMeleeStrength
void setMeleeStrength(double strength)
- Specified by:
setMeleeStrengthin 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:
setKnockbackResistancein interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>- Parameters:
resistance- Knockback resistance (0-2) default is 1
-
getKnockbackResistance
double getKnockbackResistance()
- Specified by:
getKnockbackResistancein 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:
setSpeedin interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
-
getSpeed
double getSpeed()
- Specified by:
getSpeedin 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()
-
-