public class ScriptLivingBase<T extends net.minecraft.entity.EntityLivingBase> extends ScriptEntity<T> implements IEntityLivingBase
| Constructor and Description |
|---|
ScriptLivingBase(T entity) |
| 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
|
java.lang.String |
getLookVec() |
double |
getMaxHealth() |
T |
getMCEntity()
Expert use only
|
T |
getMinecraftEntity() |
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, playSound, removeStoredData, removeTempData, setBurning, setImmune, setInvisible, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setPos, setPosition, setRider, setRotation, setSneaking, setSprinting, setStoredData, setStoredData, setTempData, setX, setY, setZ, spawnParticle, spawnParticle, spawnParticle, spawnParticle, spawnParticle, spawnParticle, spawnParticle, storeAsCloneequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearStoredData, 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, storeAsClonepublic ScriptLivingBase(T entity)
public float getHealth()
getHealth in interface IEntityLivingBasepublic void setHealth(float health)
setHealth in interface IEntityLivingBasehealth - The new health of this entitypublic void hurt(float damage)
hurt in interface IEntityLivingBasepublic void hurt(float damage,
IEntity source)
hurt in interface IEntityLivingBasepublic void hurt(float damage,
noppes.npcs.scripted.ScriptDamageSource damageSource)
hurt in interface IEntityLivingBasepublic double getMaxHealth()
getMaxHealth in interface IEntityLivingBasepublic boolean isAttacking()
isAttacking in interface IEntityLivingBasepublic void setAttackTarget(IEntityLivingBase living)
setAttackTarget in interface IEntityLivingBaseliving - Entity which this entity will attackpublic IEntityLivingBase getAttackTarget()
getAttackTarget in interface IEntityLivingBasepublic int getType()
getType in interface IEntitygetType in interface IEntityLivingBasegetType in class ScriptEntity<T extends net.minecraft.entity.EntityLivingBase>EntityTypepublic boolean typeOf(int type)
typeOf in interface IEntitytypeOf in interface IEntityLivingBasetypeOf in class ScriptEntity<T extends net.minecraft.entity.EntityLivingBase>type - @EntityType to checkpublic boolean canSeeEntity(IEntity entity)
canSeeEntity in interface IEntityLivingBaseentity - Entity to checkpublic T getMCEntity()
getMCEntity in interface IEntitygetMCEntity in interface IEntityLivingBasegetMCEntity in class ScriptEntity<T extends net.minecraft.entity.EntityLivingBase>public T getMinecraftEntity()
public void swingHand()
swingHand in interface IEntityLivingBasepublic java.lang.String getLookVec()
public void addPotionEffect(int effect,
int duration,
int strength,
boolean hideParticles)
addPotionEffect in interface IEntityLivingBaseeffect - duration - The duration in secondsstrength - The amplifier of the potion effecthideParticles - Whether or not you want to hide potion particlespublic void clearPotionEffects()
clearPotionEffects in interface IEntityLivingBasepublic int getPotionEffect(int effect)
getPotionEffect in interface IEntityLivingBaseeffect - Potion effect to checkpublic IItemStack getHeldItem()
getHeldItem in interface IEntityLivingBasepublic void setHeldItem(IItemStack item)
setHeldItem in interface IEntityLivingBaseitem - The item to be setpublic IItemStack getArmor(int slot)
getArmor in interface IEntityLivingBaseslot - Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:headpublic void setArmor(int slot,
IItemStack item)
setArmor in interface IEntityLivingBaseslot - Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:headitem - Item to be set