public interface IEntityLivingBase<T extends net.minecraft.entity.EntityLivingBase> extends IEntity<T>
| Modifier and Type | Method and Description |
|---|---|
void |
addPotionEffect(int effect,
int duration,
int strength,
boolean hideParticles)
Works the same as the /effect command
|
boolean |
canSeeEntity(IEntity entity) |
void |
clearPotionEffects()
Clears all potion effects
|
IItemStack |
getArmor(int slot)
Note not all Living Entities support this
|
IEntityLivingBase |
getAttackTarget() |
float |
getHealth() |
IItemStack |
getHeldItem()
Note not all Living Entities support this
|
IBlock |
getLookingAtBlock(int maxDistance) |
IEntity[] |
getLookingAtEntities(int maxDistance,
double offset,
double range) |
IEntity[] |
getLookingAtEntities(int maxDistance,
double offset,
double range,
boolean stopOnBlock,
boolean stopOnLiquid,
boolean stopOnCollision) |
IPos |
getLookingAtPos(int maxDistance)
Returns an IPos object corresponding to the final obstructed point following along the
entity's look vector.
|
IPos |
getLookVector() |
double |
getMaxHealth() |
T |
getMCEntity()
Expert use only
|
int |
getPotionEffect(int effect) |
int |
getType() |
void |
hurt(float damage) |
void |
hurt(float damage,
IEntity source) |
void |
hurt(float damage,
noppes.npcs.scripted.ScriptDamageSource damageSource) |
boolean |
isAttacking() |
void |
setArmor(int slot,
IItemStack item)
Note not all Living Entities support this
|
void |
setAttackTarget(IEntityLivingBase living) |
void |
setHealth(float health) |
void |
setHeldItem(IItemStack item)
Note not all Living Entities support this
|
void |
swingHand()
Makes the entity swing its hand
|
boolean |
typeOf(int type) |
clearStoredData, clearTempData, despawn, dropItem, extinguish, getAge, getAllNbt, getBlockX, getBlockY, getBlockZ, getDimension, getEntityId, getHeight, getMotionX, getMotionY, getMotionZ, getMount, getNbt, getPitch, getPos, getRider, getRotation, getStoredData, getSurroundingEntities, getSurroundingEntities, getTempData, getTypeName, getUniqueID, getWidth, getWorld, getX, getY, getYOffset, getZ, hasCollided, hasStoredData, hasTempData, inFire, inLava, inWater, isAirborne, isAlive, isBurning, isSneaking, isSprinting, knockback, knockback, removeStoredData, removeTempData, setBurning, setImmune, setInvisible, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setPos, setPosition, setRider, setRotation, setSneaking, setSprinting, setStoredData, setTempData, setX, setY, setZ, spawnParticle, storeAsClonefloat getHealth()
void setHealth(float health)
health - The new health of this entityvoid hurt(float damage)
void hurt(float damage,
IEntity source)
void hurt(float damage,
noppes.npcs.scripted.ScriptDamageSource damageSource)
double getMaxHealth()
boolean isAttacking()
void setAttackTarget(IEntityLivingBase living)
living - Entity which this entity will attackIEntityLivingBase getAttackTarget()
int getType()
getType in interface IEntity<T extends net.minecraft.entity.EntityLivingBase>EntityTypeboolean typeOf(int type)
boolean canSeeEntity(IEntity entity)
entity - Entity to checkIPos getLookVector()
IBlock getLookingAtBlock(int maxDistance)
maxDistance - The max distance to perform checks before stoppingIPos getLookingAtPos(int maxDistance)
maxDistance - The max distance to perform checks before stoppingIEntity[] getLookingAtEntities(int maxDistance, double offset, double range, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision)
maxDistance - The max distance to perform checks before stoppingrange - The radius to check for surrounding entities at every point on the vectorIEntity[] getLookingAtEntities(int maxDistance, double offset, double range)
T getMCEntity()
getMCEntity in interface IEntity<T extends net.minecraft.entity.EntityLivingBase>void swingHand()
void addPotionEffect(int effect,
int duration,
int strength,
boolean hideParticles)
effect - duration - The duration in secondsstrength - The amplifier of the potion effecthideParticles - Whether or not you want to hide potion particlesvoid clearPotionEffects()
int getPotionEffect(int effect)
effect - Potion effect to checkIItemStack getHeldItem()
void setHeldItem(IItemStack item)
item - The item to be setIItemStack getArmor(int slot)
slot - Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:headvoid setArmor(int slot,
IItemStack item)
slot - Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:headitem - Item to be set