Package noppes.npcs.api.entity
Interface ICustomNpc<T extends net.minecraft.entity.EntityCreature>
-
- Type Parameters:
T
- the underlying EntityCreature type.
- All Superinterfaces:
IAnimatable
,IEntity<T>
,IEntityLiving<T>
,IEntityLivingBase<T>
public interface ICustomNpc<T extends net.minecraft.entity.EntityCreature> extends IEntityLiving<T>, IAnimatable
Represents a customizable NPC with a wide variety of properties such as appearance, behavior, combat, loot, and more. This interface extends living entity and animation capabilities and defines methods for adjusting almost every aspect of an NPC.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
aimWhileShooting(boolean aimWhileShooting)
Deprecated.boolean
canAimWhileShooting()
Deprecated.boolean
canBreathe()
Returns whether the NPC can breathe.boolean
canFly()
Returns whether the NPC can fly.void
executeCommand(java.lang.String command)
Executes a command as the NPC.int
getAccuracy()
Returns the shooting accuracy.IActionManager
getActionManager()
Returns the action manager used for scheduling NPC actions.long
getAge()
Returns the age of the NPC in ticks.int
getAggroRange()
Returns the aggro range of the NPC.byte
getAimType()
Gets the Aim Type for an NPCIAnimationData
getAnimationData()
Returns the NPC's animation data.IItemStack
getArmor(int slot)
Returns the armor item in the specified slot.float
getArrowResistance()
Returns the NPC's arrow resistance.boolean
getAttackFactions()
Returns whether the NPC attacks other factions.ILines
getAttackLines()
Returns the lines spoken when the NPC attacks.int
getBurstCount()
Returns the number of shots in a burst.boolean
getCanDrown()
Returns whether the NPC can drown.java.lang.String
getCloakTexture()
Returns the NPC's cloak texture.int
getCollisionType()
Returns the NPC's collision type.int
getCombatPolicy()
Returns the NPC's combat policy.java.lang.String
getCombatPolicyName()
Returns the name of the NPC's combat policy.float
getCombatRegen()
Returns the NPC's combat health regeneration per second.boolean
getDefendFaction()
Returns whether the NPC defends its faction.IDialog
getDialog(int slot)
Retrieves the dialog from the specified slot.int
getDialogId(int slot)
Returns the dialog ID in the specified slot.float
getExplosionResistance()
Returns the NPC's explosion resistance.IFaction
getFaction()
Returns the faction associated with the NPC.int
getFireRate()
Returns the fire rate for ranged attacks.java.lang.String
getFireSound()
Returns the sound directory played when a projectile is fired.double
getFlyGravity(double unused)
Returns the gravity effect on the NPC while flying.int
getFlyHeightLimit(int unused)
Returns the maximum flying height for the NPC.double
getFlySpeed(double unused)
Returns the NPC's flying speed.float
getHealthRegen()
Returns the NPC's health regeneration per second when not in combat.boolean
getHideKilledBody()
Returns whether the NPC's body is hidden upon death.IPos
getHome()
Returns the NPC's home position.int
getHomeX()
Returns the home position X coordinate.int
getHomeY()
Returns the home position Y coordinate.int
getHomeZ()
Returns the home position Z coordinate.boolean
getIgnoreCobweb()
Returns whether the NPC ignores cobwebs.ILines
getInteractLines()
Returns the lines used for NPC interaction.IJob
getJob()
Returns the NPC's current job.ILines
getKilledLines()
Returns the lines spoken when the NPC is killed.ILines
getKillLines()
Returns the lines spoken when the NPC kills another entity.int
getKnockback()
Returns the knockback strength of the NPC.double
getKnockbackResistance()
Returns the NPC's knockback resistance.IItemStack
getLeftItem()
Returns the item held in the NPC's left hand.IItemStack
getLefttItem()
Deprecated.double
getLootChance(int slot)
Returns the chance for the loot item in the specified slot to drop.IItemStack
getLootItem(int slot)
Returns the loot item from the NPC's drop list for the given slot.int
getLootMode()
Returns the NPC's loot mode.IMagicData
getMagicData()
Returns the Magic Data of an NPCint
getMaxLootXP()
Returns the maximum XP dropped by the NPC.int
getMaxProjectileDelay()
Returns the maximum projectile delay.int
getMeleeRange()
Returns the melee range of the NPC.float
getMeleeResistance()
Returns the NPC's melee resistance.int
getMeleeSpeed()
Returns the melee speed of the NPC.double
getMeleeStrength()
Returns the melee strength of the NPC.int
getMinLootXP()
Returns the minimum XP dropped by the NPC.int
getMinPointsToSoulStone()
Returns the minimum faction points required to capture the NPC with a soul stone.int
getMinProjectileDelay()
Returns the minimum projectile delay.IModelData
getModelData()
Returns the model data associated with the NPC.int
getModelType()
Returns the NPC's model type.int
getMovingType()
Returns the moving type of the NPC.java.lang.String
getName()
Returns the NPC's name.IOverlayHandler
getOverlays()
Returns the NPC's overlay handler.java.lang.String
getOverlayTexture()
Returns the first overlay texture of the NPC.IItemStack
getProjectileItem()
Returns the projectile item used by the NPC.boolean
getProjectilesKeepTerrain()
Returns whether projectiles fired by the NPC ignore terrain collisions.int
getRangedBurst()
Returns the number of projectiles in a ranged burst attack.int
getRangedRange()
Returns the range for ranged attacks.int
getRangedSpeed()
Returns the ranged attack speed of the NPC.float
getRangedStrength()
Returns the ranged attack strength of the NPC.boolean
getRefuseSoulStone()
Returns whether the NPC refuses to be captured by a soul stone.int
getRespawnCycle()
Returns the NPC's respawn cycle.int
getRespawnTime()
Returns the number of ticks before the NPC respawns.boolean
getReturnToHome()
Returns whether the NPC is set to return home.IItemStack
getRightItem()
Returns the item held in the NPC's right hand.IRole
getRole()
Returns the NPC's current role.int
getRotationType()
Returns the NPC's rotation type.int
getShelterFrom()
Returns the condition under which the NPC seeks shelter.int
getShotCount()
Returns the number of shots fired.int
getShowBossBar()
Returns the visibility type of the NPC's boss bar.int
getShowName()
Returns the visibility type of the NPC's name.int
getSize()
Returns the current NPC's size (scale factor) within the range 1–30.byte
getSkinType()
Returns the NPC's skin type.java.lang.String
getSkinUrl()
Returns the NPC's skin URL.java.lang.String
getSoulStonePlayerName()
Returns the name of the player who spawned this NPC using a soul stone.double
getSpeed()
Returns the NPC's walking speed.int
getSwingWarmup()
Returns the swing warmup time (in ticks) before melee damage is applied.int
getTacticalRadius()
Returns the tactical radius affecting NPC behavior.int
getTacticalVariant()
Returns the NPC's tactical variant.java.lang.String
getTacticalVariantName()
Returns the name of the NPC's tactical variant.java.lang.String
getTexture()
Returns the NPC's texture path.ITimers
getTimers()
Returns the timers associated with the NPC.java.lang.String
getTitle()
Returns the NPC's title.int
getType()
Returns the entity type of the NPC.int
getVisibleType()
Returns the visibility type of the NPC.ILines
getWorldLines()
Returns the lines displayed in the world.void
giveItem(IPlayer player, IItemStack item)
Gives an item to the specified player.boolean
hasLivingAnimation()
Returns whether the NPC has a living animation.void
hideKilledBody(boolean hide)
Sets whether the NPC's body should be hidden upon death.boolean
isFlyHeightLimited(boolean unused)
Checks if flying height is limited.boolean
isSoulStoneInit()
Returns whether the NPC has been initialized after a soul stone spawn.boolean
isVisibleTo(IPlayer player)
Checks if the NPC is visible to a specific player.void
kill()
Kills the NPC without despawning it.void
limitFlyHeight(boolean limit)
Enables or disables flying height limitation.boolean
naturallyDespawns()
Returns whether the NPC naturally despawns.int
onFoundEnemy()
Returns the NPC's behavior when encountering an enemy.void
reset()
Resets the NPC to its initial state and triggers the initialization script.void
say(java.lang.String message)
Makes the NPC broadcast a message.void
say(IPlayer player, java.lang.String message)
Makes the NPC send a message to a specific player.void
setAccuracy(int accuracy)
Sets the shooting accuracy.void
setAggroRange(int aggroRange)
Sets the aggro range of the NPC.void
setAimType(byte aimWhileShooting)
Sets the Aim Type for an NPCvoid
setAnimation(int type)
Sets the NPC's animation type.void
setArmor(int slot, IItemStack item)
Sets the armor item in the specified slot.void
setArmsScale(float x, float y, float z)
Deprecated.void
setArrowResistance(float resistance)
Sets the NPC's arrow resistance.void
setAttackFactions(boolean attackOtherFactions)
Sets whether the NPC will attack members of other factions.void
setBodyScale(float x, float y, float z)
Deprecated.void
setBurstCount(int burstCount)
Sets the number of shots in a burst.void
setCloakTexture(java.lang.String cloakTexture)
Sets the NPC's cloak texture.void
setCollisionType(int type)
Sets the NPC's collision type.void
setCombatPolicy(int policy)
Sets the NPC's combat policy.void
setCombatPolicy(java.lang.String policy)
Sets the NPC's combat policy by name.void
setCombatRegen(float regen)
Sets the NPC's combat health regeneration per second.void
setDefendFaction(boolean defendFaction)
Sets whether the NPC should defend members of its faction.void
setDialog(int slot, int dialogId)
Sets the dialog for the specified slot by its ID.void
setDialog(int slot, IDialog dialog)
Sets the dialog for the specified slot.void
setDrowningType(int type)
Sets the drowning behavior of the NPC.void
setExplosionResistance(float resistance)
Sets the NPC's explosion resistance.void
setFaction(int id)
Sets the NPC's faction by its ID.void
setFireRate(int rate)
Sets the fire rate for ranged attacks.void
setFireSound(java.lang.String fireSound)
Sets the sound directory for projectile firing.void
setFly(int fly)
Sets the NPC's flying ability.void
setFlyGravity(double flyGravity)
Sets the gravity effect on the NPC while flying.void
setFlyHeightLimit(int flyHeightLimit)
Sets the maximum flying height for the NPC.void
setFlySpeed(double flySpeed)
Sets the NPC's flying speed.void
setHeadScale(float x, float y, float z)
Deprecated.void
setHealthRegen(float regen)
Sets the NPC's health regeneration per second when not in combat.void
setHome(int x, int y, int z)
Sets the home position using individual coordinates.void
setHome(IPos pos)
Sets the home position using an IPos instance.void
setHomeX(int x)
Sets the home position X coordinate.void
setHomeY(int y)
Sets the home position Y coordinate.void
setHomeZ(int z)
Sets the home position Z coordinate.void
setIgnoreCobweb(boolean ignore)
Sets whether the NPC ignores cobwebs.void
setJob(int job)
Sets the NPC's job by its ID.void
setKnockback(int knockback)
Sets the knockback strength of the NPC.void
setKnockbackResistance(double resistance)
Sets the NPC's knockback resistance.void
setLeftItem(IItemStack item)
Sets the item held in the NPC's left hand.void
setLegsScale(float x, float y, float z)
Deprecated.void
setLivingAnimation(boolean livingAnimation)
Sets whether the NPC has a living animation.void
setLootChance(int slot, double chance)
Sets the drop chance for the loot item in the specified slot.void
setLootItem(int slot, IItemStack item)
Sets the loot item in the NPC's drop list for the given slot.void
setLootMode(int lootMode)
Sets the NPC's loot mode.void
setMaxHealth(double health)
Sets the NPC's maximum health.void
setMaxLootXP(int lootXP)
Sets the maximum XP dropped by the NPC.void
setMaxProjectileDelay(int maxDelay)
Sets the maximum delay (in ticks) between projectiles.void
setMeleeRange(int range)
Sets the melee range of the NPC.void
setMeleeResistance(float resistance)
Sets the NPC's melee resistance.void
setMeleeSpeed(int speed)
Sets the melee speed of the NPC.void
setMeleeStrength(double strength)
Sets the melee strength of the NPC.void
setMinLootXP(int lootXP)
Sets the minimum XP dropped by the NPC.void
setMinPointsToSoulStone(int points)
Sets the minimum faction points required to capture the NPC with a soul stone.void
setMinProjectileDelay(int minDelay)
Sets the minimum delay (in ticks) between projectiles.void
setModelType(int modelType)
Sets the NPC's model type.void
setMovingType(int movingType)
Sets the moving type of the NPC.void
setName(java.lang.String name)
Sets the NPC's name.void
setNaturallyDespawns(boolean canDespawn)
Sets whether the NPC should naturally despawn.void
setOnFoundEnemy(int onAttack)
Sets the NPC's behavior when encountering an enemy.void
setOverlayTexture(java.lang.String overlayTexture)
Adds an overlay texture to the NPC.void
setProjectileItem(IItemStack item)
Sets the projectile item for the NPC.void
setProjectilesKeepTerrain(boolean b)
Sets whether projectiles fired by the NPC should ignore terrain collisions.void
setRangedBurst(int count)
Sets the number of projectiles in a ranged burst attack.void
setRangedRange(int rangedRange)
Sets the range for ranged attacks.void
setRangedSpeed(int speed)
Sets the ranged attack speed of the NPC.void
setRangedStrength(float strength)
Sets the ranged attack strength of the NPC.void
setRefuseSoulStone(boolean refuse)
Sets whether the NPC refuses to be captured by a soul stone.void
setRespawnCycle(int cycle)
Sets the NPC's respawn cycle.void
setRespawnTime(int time)
Sets the number of ticks before the NPC respawns.void
setRetaliateType(int type)
Sets the NPC's retaliation type.void
setReturnToHome(boolean bo)
Sets whether the NPC should return to its home position.void
setRightItem(IItemStack item)
Sets the item held in the NPC's right hand.void
setRole(int role)
Sets the NPC's role by its ID.void
setRotation(float rotation)
Sets the NPC's rotation (yaw).void
setRotationType(int rotationType)
Sets the NPC's rotation type.void
setShelterFrom(int shelterFrom)
Sets the condition under which the NPC seeks shelter.void
setShotCount(int shotCount)
Sets the number of shots fired.void
setShowBossBar(int type)
Sets the visibility type of the NPC's boss bar.void
setShowName(int type)
Sets the visibility type of the NPC's name.void
setSize(int size)
Sets the NPC's size (scale factor).void
setSkinType(byte type)
Sets the NPC's skin type.void
setSkinUrl(java.lang.String url)
Sets the NPC's skin URL.void
setSpeed(double speed)
Sets the NPC's walking speed.void
setSwingWarmup(int ticks)
Sets the swing warmup time (in ticks) before melee damage is applied.void
setTacticalRadius(int tacticalRadius)
Sets the tactical radius affecting NPC behavior.void
setTacticalVariant(int variant)
Sets the NPC's tactical variant.void
setTacticalVariant(java.lang.String variant)
Sets the NPC's tactical variant by its name.void
setTexture(java.lang.String texture)
Sets the NPC's texture.void
setTitle(java.lang.String title)
Sets the NPC's title.void
setVisibleTo(IPlayer player, boolean visible)
Sets whether the NPC is visible to a specific player.void
setVisibleType(int type)
Sets the visibility type of the NPC.void
shootItem(IEntityLivingBase target, IItemStack item, int accuracy)
Instructs the NPC to shoot an item at a target.boolean
spawnedFromSoulStone()
Returns whether the NPC was spawned using a soul stone.boolean
typeOf(int type)
Checks if the NPC is of the given type.void
updateAI()
Updates the NPC's AI tasks.void
updateClient()
Updates the client with the latest NPC state.-
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, clearPotionEffects, dismountEntity, getAbsorptionAmount, getAIMoveSpeed, getArrowCountInEntity, getAttackTarget, getAttackTargetTime, getFollowRange, getHealth, getHeldItem, getLastAttacker, getLastAttackerTime, getLookingAtBlock, getLookingAtBlock, getLookingAtEntities, getLookingAtEntities, getLookingAtEntities, getLookingAtPos, getLookingAtPos, getLookVector, getMaxHealth, getMaxHurtTime, getPotionEffect, getTotalArmorValue, hurt, hurt, hurt, isAttacking, isChild, isOnLadder, renderBrokenItemStack, setAbsorptionAmount, setAIMoveSpeed, setArrowCountInEntity, setAttackTarget, setFollowRange, setHealth, setHeldItem, setLastAttacker, setMaxHurtTime, swingHand
-
-
-
-
Method Detail
-
getSize
int getSize()
Returns the current NPC's size (scale factor) within the range 1–30.- Returns:
- the NPC's size.
-
setSize
void setSize(int size)
Sets the NPC's size (scale factor).- Parameters:
size
- the size of the NPC (range 1–30, default is 5).
-
getModelType
int getModelType()
Returns the NPC's model type.- Returns:
- the model type.
-
setModelType
void setModelType(int modelType)
Sets the NPC's model type.- Parameters:
modelType
- the model type (0: Steve, 1: Steve64, 2: Alex).
-
getName
java.lang.String getName()
Returns the NPC's name.- Returns:
- the NPC's name.
-
setRotation
void setRotation(float rotation)
Sets the NPC's rotation (yaw).- Specified by:
setRotation
in interfaceIEntity<T extends net.minecraft.entity.EntityCreature>
- Parameters:
rotation
- the new rotation angle in degrees.
-
setRotationType
void setRotationType(int rotationType)
Sets the NPC's rotation type.- Parameters:
rotationType
- the rotation type (implementation-specific).
-
getRotationType
int getRotationType()
Returns the NPC's rotation type.- Returns:
- the rotation type.
-
setMovingType
void setMovingType(int movingType)
Sets the moving type of the NPC.- Parameters:
movingType
- the moving type (0: standing, 1: wandering, 2: moving path).
-
getMovingType
int getMovingType()
Returns the moving type of the NPC.- Returns:
- the moving type (0: standing, 1: wandering, 2: moving path).
-
setName
void setName(java.lang.String name)
Sets the NPC's name.- Parameters:
name
- the new name.
-
getTitle
java.lang.String getTitle()
Returns the NPC's title.- Returns:
- the NPC's title.
-
setTitle
void setTitle(java.lang.String title)
Sets the NPC's title.- Parameters:
title
- the new title.
-
getTexture
java.lang.String getTexture()
Returns the NPC's texture path.- Returns:
- the texture path.
-
setTexture
void setTexture(java.lang.String texture)
Sets the NPC's texture.- Parameters:
texture
- the new texture path.
-
getHome
IPos getHome()
Returns the NPC's home position.- Returns:
- the home position as an IPos.
-
getHomeX
int getHomeX()
Returns the home position X coordinate.- Returns:
- the home X coordinate.
-
setHomeX
void setHomeX(int x)
Sets the home position X coordinate.- Parameters:
x
- the new home X coordinate.
-
getHomeY
int getHomeY()
Returns the home position Y coordinate.- Returns:
- the home Y coordinate.
-
setHomeY
void setHomeY(int y)
Sets the home position Y coordinate.- Parameters:
y
- the new home Y coordinate.
-
getHomeZ
int getHomeZ()
Returns the home position Z coordinate.- Returns:
- the home Z coordinate.
-
setHomeZ
void setHomeZ(int z)
Sets the home position Z coordinate.- Parameters:
z
- the new home Z coordinate.
-
setHome
void setHome(int x, int y, int z)
Sets the home position using individual coordinates.- Parameters:
x
- the home X coordinate.y
- the home Y coordinate.z
- the home Z coordinate.
-
setHome
void setHome(IPos pos)
Sets the home position using an IPos instance.- Parameters:
pos
- the new home position.
-
setMaxHealth
void setMaxHealth(double health)
Sets the NPC's maximum health.- Specified by:
setMaxHealth
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
health
- the new maximum health.
-
setReturnToHome
void setReturnToHome(boolean bo)
Sets whether the NPC should return to its home position.- Parameters:
bo
- true to enable returning home, false otherwise.
-
getReturnToHome
boolean getReturnToHome()
Returns whether the NPC is set to return home.- Returns:
- true if the NPC returns home, false otherwise.
-
getFaction
IFaction getFaction()
Returns the faction associated with the NPC.- Returns:
- the NPC's faction.
-
setFaction
void setFaction(int id)
Sets the NPC's faction by its ID.- Parameters:
id
- the faction ID.
-
setAttackFactions
void setAttackFactions(boolean attackOtherFactions)
Sets whether the NPC will attack members of other factions.- Parameters:
attackOtherFactions
- true to attack, false otherwise.
-
getAttackFactions
boolean getAttackFactions()
Returns whether the NPC attacks other factions.- Returns:
- true if it attacks, false otherwise.
-
setDefendFaction
void setDefendFaction(boolean defendFaction)
Sets whether the NPC should defend members of its faction.- Parameters:
defendFaction
- true to defend, false otherwise.
-
getDefendFaction
boolean getDefendFaction()
Returns whether the NPC defends its faction.- Returns:
- true if it defends, false otherwise.
-
getType
int getType()
Returns the entity type of the NPC.
-
typeOf
boolean typeOf(int type)
Checks if the NPC is of the given type.- Specified by:
typeOf
in interfaceIEntity<T extends net.minecraft.entity.EntityCreature>
- Specified by:
typeOf
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
type
- the type to check.- Returns:
- true if the NPC matches the specified type; otherwise, defers to the parent.
-
shootItem
void shootItem(IEntityLivingBase target, IItemStack item, int accuracy)
Instructs the NPC to shoot an item at a target.- Parameters:
target
- the target entity.item
- the item to shoot.accuracy
- the accuracy of the shot (0–100).
-
setProjectilesKeepTerrain
void setProjectilesKeepTerrain(boolean b)
Sets whether projectiles fired by the NPC should ignore terrain collisions.- Parameters:
b
- true if projectiles keep terrain, false otherwise.
-
getProjectilesKeepTerrain
boolean getProjectilesKeepTerrain()
Returns whether projectiles fired by the NPC ignore terrain collisions.- Returns:
- true if they ignore terrain, false otherwise.
-
say
void say(java.lang.String message)
Makes the NPC broadcast a message.- Parameters:
message
- the message to say.
-
say
void say(IPlayer player, java.lang.String message)
Makes the NPC send a message to a specific player.- Parameters:
player
- the target player.message
- the message to say.
-
getDialog
IDialog getDialog(int slot)
Retrieves the dialog from the specified slot.- Parameters:
slot
- the dialog slot.- Returns:
- the dialog instance.
-
getDialogId
int getDialogId(int slot)
Returns the dialog ID in the specified slot.- Parameters:
slot
- the dialog slot.- Returns:
- the dialog ID, or -1 if none exists.
-
setDialog
void setDialog(int slot, IDialog dialog)
Sets the dialog for the specified slot.- Parameters:
slot
- the dialog slot.dialog
- the dialog instance.
-
setDialog
void setDialog(int slot, int dialogId)
Sets the dialog for the specified slot by its ID.- Parameters:
slot
- the dialog slot.dialogId
- the dialog ID.
-
getInteractLines
ILines getInteractLines()
Returns the lines used for NPC interaction.- Returns:
- the interact lines.
-
getWorldLines
ILines getWorldLines()
Returns the lines displayed in the world.- Returns:
- the world lines.
-
getAttackLines
ILines getAttackLines()
Returns the lines spoken when the NPC attacks.- Returns:
- the attack lines.
-
getKilledLines
ILines getKilledLines()
Returns the lines spoken when the NPC is killed.- Returns:
- the killed lines.
-
getKillLines
ILines getKillLines()
Returns the lines spoken when the NPC kills another entity.- Returns:
- the kill lines.
-
kill
void kill()
Kills the NPC without despawning it.
-
reset
void reset()
Resets the NPC to its initial state and triggers the initialization script.
-
getAnimationData
IAnimationData getAnimationData()
Returns the NPC's animation data.- Specified by:
getAnimationData
in interfaceIAnimatable
- Returns:
- the animation data.
-
getRole
IRole getRole()
Returns the NPC's current role.- Returns:
- the role instance.
-
setRole
void setRole(int role)
Sets the NPC's role by its ID.- Parameters:
role
- the role ID.
-
getJob
IJob getJob()
Returns the NPC's current job.- Returns:
- the job instance.
-
setJob
void setJob(int job)
Sets the NPC's job by its ID.- Parameters:
job
- the job ID.
-
getRightItem
IItemStack getRightItem()
Returns the item held in the NPC's right hand.- Returns:
- the right-hand item.
-
setRightItem
void setRightItem(IItemStack item)
Sets the item held in the NPC's right hand.- Parameters:
item
- the new item.
-
getLefttItem
@Deprecated IItemStack getLefttItem()
Deprecated.(Deprecated) Returns the item held in the NPC's left hand.- Returns:
- the left-hand item.
-
getLeftItem
IItemStack getLeftItem()
Returns the item held in the NPC's left hand.- Returns:
- the left-hand item.
-
setLeftItem
void setLeftItem(IItemStack item)
Sets the item held in the NPC's left hand.- Parameters:
item
- the new item.
-
getProjectileItem
IItemStack getProjectileItem()
Returns the projectile item used by the NPC.- Returns:
- the projectile item.
-
setProjectileItem
void setProjectileItem(IItemStack item)
Sets the projectile item for the NPC.- Parameters:
item
- the new projectile item.
-
canAimWhileShooting
@Deprecated boolean canAimWhileShooting()
Deprecated.Checks if the NPC can aim while shooting.- Returns:
- true if aiming while shooting is enabled, false otherwise.
-
aimWhileShooting
@Deprecated void aimWhileShooting(boolean aimWhileShooting)
Deprecated.Sets whether the NPC can aim while shooting.- Parameters:
aimWhileShooting
- true to enable aiming, false to disable.
-
setAimType
void setAimType(byte aimWhileShooting)
Sets the Aim Type for an NPC- Parameters:
aimWhileShooting
- 0: No, 1: Yes, 2: On Shot
-
getAimType
byte getAimType()
Gets the Aim Type for an NPC- Returns:
- 0: No, 1: Yes, 2: On Shot
-
setMinProjectileDelay
void setMinProjectileDelay(int minDelay)
Sets the minimum delay (in ticks) between projectiles.- Parameters:
minDelay
- the minimum delay.
-
getMinProjectileDelay
int getMinProjectileDelay()
Returns the minimum projectile delay.- Returns:
- the minimum delay in ticks.
-
setMaxProjectileDelay
void setMaxProjectileDelay(int maxDelay)
Sets the maximum delay (in ticks) between projectiles.- Parameters:
maxDelay
- the maximum delay.
-
getMaxProjectileDelay
int getMaxProjectileDelay()
Returns the maximum projectile delay.- Returns:
- the maximum delay in ticks.
-
setRangedRange
void setRangedRange(int rangedRange)
Sets the range for ranged attacks.- Parameters:
rangedRange
- the ranged attack range.
-
getRangedRange
int getRangedRange()
Returns the range for ranged attacks.- Returns:
- the ranged attack range.
-
setFireRate
void setFireRate(int rate)
Sets the fire rate for ranged attacks.- Parameters:
rate
- the fire rate in ticks.
-
getFireRate
int getFireRate()
Returns the fire rate for ranged attacks.- Returns:
- the fire rate.
-
setBurstCount
void setBurstCount(int burstCount)
Sets the number of shots in a burst.- Parameters:
burstCount
- the burst count.
-
getBurstCount
int getBurstCount()
Returns the number of shots in a burst.- Returns:
- the burst count.
-
setShotCount
void setShotCount(int shotCount)
Sets the number of shots fired.- Parameters:
shotCount
- the shot count.
-
getShotCount
int getShotCount()
Returns the number of shots fired.- Returns:
- the shot count.
-
setAccuracy
void setAccuracy(int accuracy)
Sets the shooting accuracy.- Parameters:
accuracy
- the accuracy (0–100).
-
getAccuracy
int getAccuracy()
Returns the shooting accuracy.- Returns:
- the accuracy value.
-
getFireSound
java.lang.String getFireSound()
Returns the sound directory played when a projectile is fired.- Returns:
- the fire sound directory.
-
setFireSound
void setFireSound(java.lang.String fireSound)
Sets the sound directory for projectile firing.- Parameters:
fireSound
- the new fire sound directory.
-
getArmor
IItemStack getArmor(int slot)
Returns the armor item in the specified slot.- Specified by:
getArmor
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
slot
- the armor slot (0: head, 1: body, 2: legs, 3: boots).- Returns:
- the armor item.
-
setArmor
void setArmor(int slot, IItemStack item)
Sets the armor item in the specified slot.- Specified by:
setArmor
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
slot
- the armor slot (0: head, 1: body, 2: legs, 3: boots).item
- the armor item.
-
getLootItem
IItemStack getLootItem(int slot)
Returns the loot item from the NPC's drop list for the given slot.- Parameters:
slot
- the loot slot (0–8).- Returns:
- the loot item.
-
setLootItem
void setLootItem(int slot, IItemStack item)
Sets the loot item in the NPC's drop list for the given slot.- Parameters:
slot
- the loot slot (0–8).item
- the new loot item.
-
getLootChance
double getLootChance(int slot)
Returns the chance for the loot item in the specified slot to drop.- Parameters:
slot
- the loot slot (0–8).- Returns:
- the drop chance (default 100 if not set).
-
setLootChance
void setLootChance(int slot, double chance)
Sets the drop chance for the loot item in the specified slot.- Parameters:
slot
- the loot slot (0–8).chance
- the new drop chance.
-
getLootMode
int getLootMode()
Returns the NPC's loot mode.- Returns:
- the loot mode (0: Normal, 1: Auto Pickup).
-
setLootMode
void setLootMode(int lootMode)
Sets the NPC's loot mode.- Parameters:
lootMode
- the loot mode (0: Normal, 1: Auto Pickup).
-
setMinLootXP
void setMinLootXP(int lootXP)
Sets the minimum XP dropped by the NPC.- Parameters:
lootXP
- the minimum loot XP.
-
setMaxLootXP
void setMaxLootXP(int lootXP)
Sets the maximum XP dropped by the NPC.- Parameters:
lootXP
- the maximum loot XP.
-
getMinLootXP
int getMinLootXP()
Returns the minimum XP dropped by the NPC.- Returns:
- the minimum loot XP.
-
getMaxLootXP
int getMaxLootXP()
Returns the maximum XP dropped by the NPC.- Returns:
- the maximum loot XP.
-
getCanDrown
boolean getCanDrown()
Returns whether the NPC can drown.- Returns:
- true if the NPC can drown, false otherwise.
-
setDrowningType
void setDrowningType(int type)
Sets the drowning behavior of the NPC.- Parameters:
type
- 0: Never drowns, 1: Drowns in water, 2: Drowns in air (without water).
-
canBreathe
boolean canBreathe()
Returns whether the NPC can breathe.- Returns:
- true if the NPC can breathe, false otherwise.
-
setAnimation
void setAnimation(int type)
Sets the NPC's animation type.- Parameters:
type
- the animation type.
-
setTacticalVariant
void setTacticalVariant(int variant)
Sets the NPC's tactical variant.- Parameters:
variant
- the tactical variant (0: Rush, 1: Dodge, 2: Surround, 3: Hit N Run, 4: Ambush, 5: Stalk, 6: None).
-
getTacticalVariant
int getTacticalVariant()
Returns the NPC's tactical variant.- Returns:
- the tactical variant as an integer.
-
setTacticalVariant
void setTacticalVariant(java.lang.String variant)
Sets the NPC's tactical variant by its name.- Parameters:
variant
- the name of the tactical variant.
-
getTacticalVariantName
java.lang.String getTacticalVariantName()
Returns the name of the NPC's tactical variant.- Returns:
- the tactical variant name.
-
getCombatPolicyName
java.lang.String getCombatPolicyName()
Returns the name of the NPC's combat policy.- Returns:
- the combat policy name.
-
setCombatPolicy
void setCombatPolicy(int policy)
Sets the NPC's combat policy.- Parameters:
policy
- the combat policy (0: Flip, 1: Brute, 2: Stubborn, 4: Tactical).
-
getCombatPolicy
int getCombatPolicy()
Returns the NPC's combat policy.- Returns:
- the combat policy as an integer.
-
setCombatPolicy
void setCombatPolicy(java.lang.String policy)
Sets the NPC's combat policy by name.- Parameters:
policy
- the combat policy name.
-
setTacticalRadius
void setTacticalRadius(int tacticalRadius)
Sets the tactical radius affecting NPC behavior.- Parameters:
tacticalRadius
- the tactical radius.
-
getTacticalRadius
int getTacticalRadius()
Returns the tactical radius affecting NPC behavior.- Returns:
- the tactical radius.
-
setIgnoreCobweb
void setIgnoreCobweb(boolean ignore)
Sets whether the NPC ignores cobwebs.- Parameters:
ignore
- true to ignore cobwebs, false otherwise.
-
getIgnoreCobweb
boolean getIgnoreCobweb()
Returns whether the NPC ignores cobwebs.- Returns:
- true if cobwebs are ignored, false otherwise.
-
setOnFoundEnemy
void setOnFoundEnemy(int onAttack)
Sets the NPC's behavior when encountering an enemy.- Parameters:
onAttack
- 0: Retaliate, 1: Panic, 2: Retreat, 3: Nothing.
-
onFoundEnemy
int onFoundEnemy()
Returns the NPC's behavior when encountering an enemy.- Returns:
- an integer representing the behavior (0: Retaliate, 1: Panic, 2: Retreat, 3: Nothing).
-
setShelterFrom
void setShelterFrom(int shelterFrom)
Sets the condition under which the NPC seeks shelter.- Parameters:
shelterFrom
- 0: Darkness, 1: Sunlight, 2: Disabled.
-
getShelterFrom
int getShelterFrom()
Returns the condition under which the NPC seeks shelter.- Returns:
- an integer representing the shelter condition (0: Darkness, 1: Sunlight, 2: Disabled).
-
hasLivingAnimation
boolean hasLivingAnimation()
Returns whether the NPC has a living animation.- Returns:
- true if living animation is enabled, false otherwise.
-
setLivingAnimation
void setLivingAnimation(boolean livingAnimation)
Sets whether the NPC has a living animation.- Parameters:
livingAnimation
- true to enable living animation, false to disable.
-
setVisibleType
void setVisibleType(int type)
Sets the visibility type of the NPC.- Parameters:
type
- the visibility type (0: visible, 1: invisible, 2: semi-visible).
-
getVisibleType
int getVisibleType()
Returns the visibility type of the NPC.- Returns:
- the visibility type.
-
setVisibleTo
void setVisibleTo(IPlayer player, boolean visible)
Sets whether the NPC is visible to a specific player.- Parameters:
player
- the player.visible
- true if the NPC should be visible, false if invisible.
-
isVisibleTo
boolean isVisibleTo(IPlayer player)
Checks if the NPC is visible to a specific player.- Parameters:
player
- the player.- Returns:
- true if the NPC is visible, false otherwise.
-
setShowName
void setShowName(int type)
Sets the visibility type of the NPC's name.- Parameters:
type
- the visibility type (0: visible, 1: invisible, 2: when attacking).
-
getShowName
int getShowName()
Returns the visibility type of the NPC's name.- Returns:
- the name visibility type.
-
getShowBossBar
int getShowBossBar()
Returns the visibility type of the NPC's boss bar.- Returns:
- the boss bar visibility (0: invisible, 1: visible, 2: when attacking).
-
setShowBossBar
void setShowBossBar(int type)
Sets the visibility type of the NPC's boss bar.- Parameters:
type
- the boss bar visibility (0: invisible, 1: visible, 2: when attacking).
-
getMeleeStrength
double getMeleeStrength()
Returns the melee strength of the NPC.- Specified by:
getMeleeStrength
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Returns:
- the melee strength.
-
setMeleeStrength
void setMeleeStrength(double strength)
Sets the melee strength of the NPC.- Specified by:
setMeleeStrength
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
strength
- the new melee strength.
-
getMeleeSpeed
int getMeleeSpeed()
Returns the melee speed of the NPC.- Returns:
- the melee speed.
-
setMeleeSpeed
void setMeleeSpeed(int speed)
Sets the melee speed of the NPC.- Parameters:
speed
- the new melee speed.
-
getMeleeRange
int getMeleeRange()
Returns the melee range of the NPC.- Returns:
- the melee range.
-
setMeleeRange
void setMeleeRange(int range)
Sets the melee range of the NPC.- Parameters:
range
- the new melee range.
-
getSwingWarmup
int getSwingWarmup()
Returns the swing warmup time (in ticks) before melee damage is applied.- Returns:
- the swing warmup time.
-
setSwingWarmup
void setSwingWarmup(int ticks)
Sets the swing warmup time (in ticks) before melee damage is applied.- Parameters:
ticks
- the warmup time.
-
getKnockback
int getKnockback()
Returns the knockback strength of the NPC.- Returns:
- the knockback strength.
-
setKnockback
void setKnockback(int knockback)
Sets the knockback strength of the NPC.- Parameters:
knockback
- the new knockback strength.
-
getAggroRange
int getAggroRange()
Returns the aggro range of the NPC.- Returns:
- the aggro range.
-
setAggroRange
void setAggroRange(int aggroRange)
Sets the aggro range of the NPC.- Parameters:
aggroRange
- the new aggro range.
-
getRangedStrength
float getRangedStrength()
Returns the ranged attack strength of the NPC.- Returns:
- the ranged strength.
-
setRangedStrength
void setRangedStrength(float strength)
Sets the ranged attack strength of the NPC.- Parameters:
strength
- the new ranged strength.
-
getRangedSpeed
int getRangedSpeed()
Returns the ranged attack speed of the NPC.- Returns:
- the ranged speed.
-
setRangedSpeed
void setRangedSpeed(int speed)
Sets the ranged attack speed of the NPC.- Parameters:
speed
- the new ranged speed.
-
getRangedBurst
int getRangedBurst()
Returns the number of projectiles in a ranged burst attack.- Returns:
- the burst count.
-
setRangedBurst
void setRangedBurst(int count)
Sets the number of projectiles in a ranged burst attack.- Parameters:
count
- the new burst count.
-
getRespawnTime
int getRespawnTime()
Returns the number of ticks before the NPC respawns.- Returns:
- the respawn time.
-
setRespawnTime
void setRespawnTime(int time)
Sets the number of ticks before the NPC respawns.- Parameters:
time
- the respawn time.
-
getRespawnCycle
int getRespawnCycle()
Returns the NPC's respawn cycle.- Returns:
- the respawn cycle (0: Always, 1: Day, 2: Night, 3: No respawn).
-
setRespawnCycle
void setRespawnCycle(int cycle)
Sets the NPC's respawn cycle.- Parameters:
cycle
- the respawn cycle (0: Always, 1: Day, 2: Night, 3: No respawn).
-
getHideKilledBody
boolean getHideKilledBody()
Returns whether the NPC's body is hidden upon death.- Returns:
- true if the body is hidden, false otherwise.
-
hideKilledBody
void hideKilledBody(boolean hide)
Sets whether the NPC's body should be hidden upon death.- Parameters:
hide
- true to hide the body, false otherwise.
-
naturallyDespawns
boolean naturallyDespawns()
Returns whether the NPC naturally despawns.- Returns:
- true if it naturally despawns, false otherwise.
-
setNaturallyDespawns
void setNaturallyDespawns(boolean canDespawn)
Sets whether the NPC should naturally despawn.- Parameters:
canDespawn
- true to allow natural despawning, false otherwise.
-
spawnedFromSoulStone
boolean spawnedFromSoulStone()
Returns whether the NPC was spawned using a soul stone.- Returns:
- true if spawned from a soul stone, false otherwise.
-
getSoulStonePlayerName
java.lang.String getSoulStonePlayerName()
Returns the name of the player who spawned this NPC using a soul stone.- Returns:
- the player's name, or null if not spawned by soul stone.
-
isSoulStoneInit
boolean isSoulStoneInit()
Returns whether the NPC has been initialized after a soul stone spawn.- Returns:
- true if initialized, false otherwise.
-
getRefuseSoulStone
boolean getRefuseSoulStone()
Returns whether the NPC refuses to be captured by a soul stone.- Returns:
- true if it refuses, false otherwise.
-
setRefuseSoulStone
void setRefuseSoulStone(boolean refuse)
Sets whether the NPC refuses to be captured by a soul stone.- Parameters:
refuse
- true to refuse, false to allow.
-
getMinPointsToSoulStone
int getMinPointsToSoulStone()
Returns the minimum faction points required to capture the NPC with a soul stone.- Returns:
- the minimum points (default -1 means use the faction's friendly points).
-
setMinPointsToSoulStone
void setMinPointsToSoulStone(int points)
Sets the minimum faction points required to capture the NPC with a soul stone.- Parameters:
points
- the minimum faction points.
-
giveItem
void giveItem(IPlayer player, IItemStack item)
Gives an item to the specified player.- Parameters:
player
- the recipient.item
- the item to give.
-
executeCommand
void executeCommand(java.lang.String command)
Executes a command as the NPC.Note: On servers the enable-command-block option must be set to true.
- Parameters:
command
- the command to execute.
-
getModelData
IModelData getModelData()
Returns the model data associated with the NPC.- Returns:
- the model data, or null if not available.
-
setHeadScale
@Deprecated void setHeadScale(float x, float y, float z)
Deprecated.(Deprecated) Sets the head scale of the NPC.- Parameters:
x
- scale factor along the X-axis.y
- scale factor along the Y-axis.z
- scale factor along the Z-axis.
-
setBodyScale
@Deprecated void setBodyScale(float x, float y, float z)
Deprecated.(Deprecated) Sets the body scale of the NPC.- Parameters:
x
- scale factor along the X-axis.y
- scale factor along the Y-axis.z
- scale factor along the Z-axis.
-
setArmsScale
@Deprecated void setArmsScale(float x, float y, float z)
Deprecated.(Deprecated) Sets the arms scale of the NPC.- Parameters:
x
- scale factor along the X-axis.y
- scale factor along the Y-axis.z
- scale factor along the Z-axis.
-
setLegsScale
@Deprecated void setLegsScale(float x, float y, float z)
Deprecated.(Deprecated) Sets the legs scale of the NPC.- Parameters:
x
- scale factor along the X-axis.y
- scale factor along the Y-axis.z
- scale factor along the Z-axis.
-
setExplosionResistance
void setExplosionResistance(float resistance)
Sets the NPC's explosion resistance.- Parameters:
resistance
- the resistance (0–2, default is 1).
-
getExplosionResistance
float getExplosionResistance()
Returns the NPC's explosion resistance.- Returns:
- the explosion resistance.
-
setMeleeResistance
void setMeleeResistance(float resistance)
Sets the NPC's melee resistance.- Parameters:
resistance
- the resistance (0–2, default is 1).
-
getMeleeResistance
float getMeleeResistance()
Returns the NPC's melee resistance.- Returns:
- the melee resistance.
-
setArrowResistance
void setArrowResistance(float resistance)
Sets the NPC's arrow resistance.- Parameters:
resistance
- the resistance (0–2, default is 1).
-
getArrowResistance
float getArrowResistance()
Returns the NPC's arrow resistance.- Returns:
- the arrow resistance.
-
setKnockbackResistance
void setKnockbackResistance(double resistance)
Sets the NPC's knockback resistance.- Specified by:
setKnockbackResistance
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
resistance
- the resistance (0–2, default is 1).
-
getKnockbackResistance
double getKnockbackResistance()
Returns the NPC's knockback resistance.- Specified by:
getKnockbackResistance
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Returns:
- the knockback resistance.
-
setRetaliateType
void setRetaliateType(int type)
Sets the NPC's retaliation type.- Parameters:
type
- the retaliation type (0: normal, 1: panic, 2: retreat, 3: nothing).
-
getCombatRegen
float getCombatRegen()
Returns the NPC's combat health regeneration per second.- Returns:
- the combat regen rate.
-
setCombatRegen
void setCombatRegen(float regen)
Sets the NPC's combat health regeneration per second.- Parameters:
regen
- the combat regen rate.
-
getHealthRegen
float getHealthRegen()
Returns the NPC's health regeneration per second when not in combat.- Returns:
- the health regen rate.
-
setHealthRegen
void setHealthRegen(float regen)
Sets the NPC's health regeneration per second when not in combat.- Parameters:
regen
- the health regen rate.
-
getAge
long getAge()
Returns the age of the NPC in ticks.
-
getTimers
ITimers getTimers()
Returns the timers associated with the NPC.- Returns:
- the timers.
-
setFly
void setFly(int fly)
Sets the NPC's flying ability.- Parameters:
fly
- 1 to enable flying, 0 to disable.
-
canFly
boolean canFly()
Returns whether the NPC can fly.- Returns:
- true if flying is enabled, false otherwise.
-
setFlySpeed
void setFlySpeed(double flySpeed)
Sets the NPC's flying speed.- Parameters:
flySpeed
- the fly speed.
-
getFlySpeed
double getFlySpeed(double unused)
Returns the NPC's flying speed.- Parameters:
unused
- unused parameter.- Returns:
- the fly speed.
-
setFlyGravity
void setFlyGravity(double flyGravity)
Sets the gravity effect on the NPC while flying.- Parameters:
flyGravity
- the fly gravity (0.0–1.0).
-
getFlyGravity
double getFlyGravity(double unused)
Returns the gravity effect on the NPC while flying.- Parameters:
unused
- unused parameter.- Returns:
- the fly gravity.
-
setFlyHeightLimit
void setFlyHeightLimit(int flyHeightLimit)
Sets the maximum flying height for the NPC.- Parameters:
flyHeightLimit
- the height limit.
-
getFlyHeightLimit
int getFlyHeightLimit(int unused)
Returns the maximum flying height for the NPC.- Parameters:
unused
- unused parameter.- Returns:
- the fly height limit.
-
limitFlyHeight
void limitFlyHeight(boolean limit)
Enables or disables flying height limitation.- Parameters:
limit
- true to enable limitation, false to disable.
-
isFlyHeightLimited
boolean isFlyHeightLimited(boolean unused)
Checks if flying height is limited.- Parameters:
unused
- unused parameter.- Returns:
- true if limited, false otherwise.
-
setSpeed
void setSpeed(double speed)
Sets the NPC's walking speed.- Specified by:
setSpeed
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Parameters:
speed
- the walking speed.
-
getSpeed
double getSpeed()
Returns the NPC's walking speed.- Specified by:
getSpeed
in interfaceIEntityLivingBase<T extends net.minecraft.entity.EntityCreature>
- Returns:
- the walking speed.
-
setSkinType
void setSkinType(byte type)
Sets the NPC's skin type.- Parameters:
type
- the skin type.
-
getSkinType
byte getSkinType()
Returns the NPC's skin type.- Returns:
- the skin type.
-
setSkinUrl
void setSkinUrl(java.lang.String url)
Sets the NPC's skin URL.- Parameters:
url
- the skin URL.
-
getSkinUrl
java.lang.String getSkinUrl()
Returns the NPC's skin URL.- Returns:
- the skin URL.
-
setCloakTexture
void setCloakTexture(java.lang.String cloakTexture)
Sets the NPC's cloak texture.- Parameters:
cloakTexture
- the cloak texture.
-
getCloakTexture
java.lang.String getCloakTexture()
Returns the NPC's cloak texture.- Returns:
- the cloak texture.
-
setOverlayTexture
void setOverlayTexture(java.lang.String overlayTexture)
Adds an overlay texture to the NPC.- Parameters:
overlayTexture
- the overlay texture.
-
getOverlayTexture
java.lang.String getOverlayTexture()
Returns the first overlay texture of the NPC.- Returns:
- the overlay texture, or an empty string if none.
-
getOverlays
IOverlayHandler getOverlays()
Returns the NPC's overlay handler.- Returns:
- the overlay handler.
-
setCollisionType
void setCollisionType(int type)
Sets the NPC's collision type.- Parameters:
type
- the collision type.
-
getCollisionType
int getCollisionType()
Returns the NPC's collision type.- Returns:
- the collision type.
-
updateClient
void updateClient()
Updates the client with the latest NPC state.
-
updateAI
void updateAI()
Updates the NPC's AI tasks.
-
getActionManager
IActionManager getActionManager()
Returns the action manager used for scheduling NPC actions.- Returns:
- the action manager.
-
getMagicData
IMagicData getMagicData()
Returns the Magic Data of an NPC- Returns:
- Magic data
-
-