Package noppes.npcs.api.entity
Interface IEntityLiving<T extends net.minecraft.world.entity.LivingEntity>
- All Superinterfaces:
IEntity<T>
- All Known Subinterfaces:
IAnimal<T>
,ICustomNpc<T>
,IMob<T>
,IMonster<T>
,IPixelmon<T>
,IPlayer<T>
,IVillager<T>
public interface IEntityLiving<T extends net.minecraft.world.entity.LivingEntity>
extends IEntity<T>
-
Method Summary
Modifier and TypeMethodDescriptionaddMark
(int type) void
addPotionEffect
(int effect, int duration, int strength, boolean hideParticles) Works the same as the /effect commandboolean
canSeeEntity
(IEntity entity) void
getArmor
(int slot) Note not all Living Entities support thisfloat
int
IMark[]
getMarks()
float
Expert users onlyfloat
float
float
int
getPotionEffect
(int effect) boolean
boolean
isChild()
void
removeMark
(IMark mark) void
setArmor
(int slot, IItemStack item) void
setAttackTarget
(IEntityLiving 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
void
Methods inherited from interface noppes.npcs.api.entity.IEntity
addRider, addTag, clearRiders, damage, 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
IEntityLiving getAttackTarget() -
getLastAttacked
IEntityLiving 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.world.entity.LivingEntity>
- 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)
-