Package noppes.npcs.api.entity
Interface IEntityLivingBase<T extends net.minecraft.entity.EntityLivingBase>
- All Superinterfaces:
IEntity<T>
- All Known Subinterfaces:
IAnimal<T>
,ICustomNpc<T>
,IEntityLiving<T>
,IMonster<T>
,IPixelmon<T>
,IPlayer<T>
,IVillager<T>
public interface IEntityLivingBase<T extends net.minecraft.entity.EntityLivingBase> extends IEntity<T>
-
Method Summary
Modifier and Type Method Description IMark
addMark(int type)
void
addPotionEffect(int effect, int duration, int strength, boolean hideParticles)
Works the same as the /effect commandboolean
canSeeEntity(IEntity entity)
void
clearPotionEffects()
IItemStack
getArmor(int slot)
Note not all Living Entities support thisIEntityLivingBase
getAttackTarget()
float
getHealth()
IEntityLivingBase
getLastAttacked()
int
getLastAttackedTime()
IItemStack
getMainhandItem()
IMark[]
getMarks()
float
getMaxHealth()
T
getMCEntity()
Expert users onlyfloat
getMoveForward()
float
getMoveStrafing()
float
getMoveVertical()
IItemStack
getOffhandItem()
int
getPotionEffect(int effect)
boolean
isAttacking()
boolean
isChild()
void
removeMark(IMark mark)
void
setArmor(int slot, IItemStack item)
void
setAttackTarget(IEntityLivingBase living)
void
setHealth(float health)
void
setMainhandItem(IItemStack item)
void
setMaxHealth(float health)
void
setMoveForward(float move)
void
setMoveStrafing(float move)
void
setMoveVertical(float move)
void
setOffhandItem(IItemStack item)
void
swingMainhand()
void
swingOffhand()
Methods inherited from interface noppes.npcs.api.entity.IEntity
addRider, addTag, clearRiders, damage, despawn, dropItem, extinguish, generateNewUUID, getAge, getAllRiders, getBlockX, getBlockY, getBlockZ, getEntityName, getEntityNbt, getEyeHeight, getHeight, getMotionX, getMotionY, getMotionZ, getMount, getName, getNbt, getPitch, getPos, getRiders, getRotation, getStoreddata, getTags, getTempdata, getType, getTypeName, getUUID, getWidth, getWorld, getX, getY, getZ, hasCustomName, hasTag, inFire, inLava, inWater, isAlive, isBurning, isSneaking, isSprinting, kill, knockback, playAnimation, rayTraceBlock, rayTraceEntities, removeTag, setBurning, setEntityNbt, setMotionX, setMotionY, setMotionZ, setMount, setName, setPitch, setPos, setPosition, setRotation, setX, setY, setZ, spawn, storeAsClone, typeOf
-
Method Details
-
getHealth
float getHealth() -
setHealth
void setHealth(float health) -
getMaxHealth
float getMaxHealth() -
setMaxHealth
void setMaxHealth(float health) -
isAttacking
boolean isAttacking() -
setAttackTarget
-
getAttackTarget
IEntityLivingBase getAttackTarget() -
getLastAttacked
IEntityLivingBase getLastAttacked()- Returns:
- Returns the last Entity this Entity attacked
-
getLastAttackedTime
int getLastAttackedTime()- Returns:
- Returns the age of this entity when it was last attacked
-
canSeeEntity
-
swingMainhand
void swingMainhand() -
swingOffhand
void swingOffhand() -
getMainhandItem
IItemStack getMainhandItem() -
setMainhandItem
-
getOffhandItem
IItemStack getOffhandItem() -
setOffhandItem
-
getArmor
Note not all Living Entities support this- Parameters:
slot
- Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head- Returns:
- The item in the given slot
-
setArmor
- Parameters:
slot
- Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:headitem
- Item to be set
-
addPotionEffect
void addPotionEffect(int effect, int duration, int strength, boolean hideParticles)Works the same as the /effect command- Parameters:
effect
-duration
- The duration in secondsstrength
- The amplifier of the potion effecthideParticles
- Whether or not you want to hide potion particles
-
clearPotionEffects
void clearPotionEffects() -
getPotionEffect
int getPotionEffect(int effect) -
addMark
-
removeMark
-
getMarks
IMark[] getMarks() -
isChild
boolean isChild() -
getMCEntity
T getMCEntity()Description copied from interface:IEntity
Expert users only- Specified by:
getMCEntity
in interfaceIEntity<T extends net.minecraft.entity.EntityLivingBase>
- Returns:
- Returns minecrafts entity
-
getMoveForward
float getMoveForward() -
setMoveForward
void setMoveForward(float move) -
getMoveStrafing
float getMoveStrafing() -
setMoveStrafing
void setMoveStrafing(float move) -
getMoveVertical
float getMoveVertical() -
setMoveVertical
void setMoveVertical(float move)
-