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) voidaddPotionEffect(int effect, int duration, int strength, boolean hideParticles) Works the same as the /effect commandbooleancanSeeEntity(IEntity entity) voidgetArmor(int slot) Note not all Living Entities support thisfloatintIMark[]getMarks()floatExpert users onlyfloatfloatfloatintgetPotionEffect(int effect) booleanbooleanisChild()voidremoveMark(IMark mark) voidsetArmor(int slot, IItemStack item) voidsetAttackTarget(IEntityLiving living) voidsetHealth(float health) voidsetMainhandItem(IItemStack item) voidsetMaxHealth(float health) voidsetMoveForward(float move) voidsetMoveStrafing(float move) voidsetMoveVertical(float move) voidsetOffhandItem(IItemStack item) voidvoidMethods 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:IEntityExpert users only- Specified by:
getMCEntityin 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)
-