public abstract class Entity
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Entity.EnumEntitySize |
Modifier and Type | Method and Description |
---|---|
void |
addEntityCrashInfo(CrashReportCategory par1CrashReportCategory) |
void |
addToPlayerScore(Entity par1Entity,
int par2) |
void |
addVelocity(double par1,
double par3,
double par5) |
void |
applyEntityCollision(Entity par1Entity) |
boolean |
attackEntityFrom(DamageSource par1DamageSource,
float par2) |
boolean |
canAttackWithItem() |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
boolean |
canRenderOnFire() |
boolean |
canRiderInteract()
If a rider of this entity can interact with this entity.
|
protected boolean |
canTriggerWalking() |
void |
copyDataFrom(Entity par1Entity,
boolean par2) |
void |
copyLocationAndAnglesFrom(Entity par1Entity) |
protected void |
dealFireDamage(int par1) |
boolean |
doesEntityNotTriggerPressurePlate() |
EntityItem |
dropItem(Item p_145779_1_,
int p_145779_2_) |
EntityItem |
entityDropItem(ItemStack par1ItemStack,
float par2) |
protected abstract void |
entityInit() |
boolean |
equals(java.lang.Object par1Obj) |
void |
extinguish() |
protected void |
fall(float par1) |
IChatComponent |
func_145748_c_() |
protected boolean |
func_145771_j(double p_145771_1_,
double p_145771_3_,
double p_145771_5_) |
float |
func_145772_a(Explosion p_145772_1_,
World p_145772_2_,
int p_145772_3_,
int p_145772_4_,
int p_145772_5_,
Block p_145772_6_) |
boolean |
func_145774_a(Explosion p_145774_1_,
World p_145774_2_,
int p_145774_3_,
int p_145774_4_,
int p_145774_5_,
Block p_145774_6_,
float p_145774_7_) |
protected void |
func_145775_I() |
EntityItem |
func_145778_a(Item p_145778_1_,
int p_145778_2_,
float p_145778_3_) |
protected void |
func_145780_a(int p_145780_1_,
int p_145780_2_,
int p_145780_3_,
Block p_145780_4_) |
void |
func_145781_i(int p_145781_1_) |
int |
getAir() |
AxisAlignedBB |
getBoundingBox() |
float |
getBrightness(float par1) |
int |
getBrightnessForRender(float par1) |
float |
getCollisionBorderSize() |
AxisAlignedBB |
getCollisionBox(Entity par1Entity) |
java.lang.String |
getCommandSenderName() |
DataWatcher |
getDataWatcher() |
double |
getDistance(double par1,
double par3,
double par5) |
double |
getDistanceSq(double par1,
double par3,
double par5) |
double |
getDistanceSqToEntity(Entity par1Entity) |
float |
getDistanceToEntity(Entity par1Entity) |
NBTTagCompound |
getEntityData()
Returns a NBTTagCompound that can be used to store custom data for this entity.
|
int |
getEntityId() |
protected java.lang.String |
getEntityString() |
IExtendedEntityProperties |
getExtendedProperties(java.lang.String identifier)
Gets the extended properties identified by the passed in key
|
float |
getEyeHeight() |
protected boolean |
getFlag(int par1) |
ItemStack[] |
getLastActiveItems() |
Vec3 |
getLookVec() |
int |
getMaxInPortalTime() |
int |
getMaxSafePointTries() |
double |
getMountedYOffset() |
Entity[] |
getParts() |
java.util.UUID |
getPersistentID() |
ItemStack |
getPickedResult(MovingObjectPosition target)
Called when a user uses the creative pick block button on this entity.
|
int |
getPortalCooldown() |
float |
getRotationYawHead() |
float |
getShadowSize() |
protected java.lang.String |
getSplashSound() |
protected java.lang.String |
getSwimSound() |
int |
getTeleportDirection() |
java.util.UUID |
getUniqueID() |
double |
getYOffset() |
void |
handleHealthUpdate(byte par1) |
boolean |
handleLavaMovement() |
boolean |
handleWaterMovement() |
int |
hashCode() |
boolean |
hitByEntity(Entity par1Entity) |
boolean |
interactFirst(EntityPlayer par1EntityPlayer) |
boolean |
isBurning() |
boolean |
isCreatureType(EnumCreatureType type,
boolean forSpawnCount)
Returns true if the entity is of the @link{EnumCreatureType} provided
|
boolean |
isEating() |
boolean |
isEntityAlive() |
boolean |
isEntityEqual(Entity par1Entity) |
boolean |
isEntityInsideOpaqueBlock() |
boolean |
isEntityInvulnerable() |
boolean |
isImmuneToFire() |
boolean |
isInRangeToRender3d(double p_145770_1_,
double p_145770_3_,
double p_145770_5_) |
boolean |
isInRangeToRenderDist(double par1) |
boolean |
isInsideOfMaterial(Material par1Material) |
boolean |
isInvisible() |
boolean |
isInvisibleToPlayer(EntityPlayer par1EntityPlayer) |
boolean |
isInWater() |
boolean |
isOffsetPositionInLiquid(double par1,
double par3,
double par5) |
boolean |
isPushedByWater() |
boolean |
isRiding() |
boolean |
isSneaking() |
boolean |
isSprinting() |
boolean |
isWet() |
protected void |
kill() |
void |
mountEntity(Entity par1Entity) |
void |
moveEntity(double par1,
double par3,
double par5) |
void |
moveFlying(float par1,
float par2,
float par3) |
protected NBTTagList |
newDoubleNBTList(double... par1ArrayOfDouble) |
protected NBTTagList |
newFloatNBTList(float... par1ArrayOfFloat) |
void |
onChunkLoad() |
void |
onCollideWithPlayer(EntityPlayer par1EntityPlayer) |
void |
onEntityUpdate() |
void |
onKillEntity(EntityLivingBase par1EntityLivingBase) |
void |
onStruckByLightning(EntityLightningBolt par1EntityLightningBolt) |
void |
onUpdate() |
void |
performHurtAnimation() |
void |
playSound(java.lang.String par1Str,
float par2,
float par3) |
protected void |
preparePlayerToSpawn() |
protected abstract void |
readEntityFromNBT(NBTTagCompound var1) |
void |
readFromNBT(NBTTagCompound par1NBTTagCompound) |
java.lang.String |
registerExtendedProperties(java.lang.String identifier,
IExtendedEntityProperties properties)
Register the instance of IExtendedProperties into the entity's collection.
|
void |
resetEntityId()
Reset the entity ID to a new value.
|
void |
setAir(int par1) |
void |
setAngles(float par1,
float par2) |
protected void |
setBeenAttacked() |
void |
setCurrentItemOrArmor(int par1,
ItemStack par2ItemStack) |
void |
setDead() |
void |
setEating(boolean par1) |
void |
setEntityId(int p_145769_1_) |
void |
setFire(int par1) |
protected void |
setFlag(int par1,
boolean par2) |
void |
setInPortal() |
void |
setInvisible(boolean par1) |
void |
setInWeb() |
void |
setLocationAndAngles(double par1,
double par3,
double par5,
float par7,
float par8) |
protected void |
setOnFireFromLava() |
void |
setPosition(double par1,
double par3,
double par5) |
void |
setPositionAndRotation(double par1,
double par3,
double par5,
float par7,
float par8) |
void |
setPositionAndRotation2(double par1,
double par3,
double par5,
float par7,
float par8,
int par9) |
protected void |
setRotation(float par1,
float par2) |
void |
setRotationYawHead(float par1) |
protected void |
setSize(float par1,
float par2) |
void |
setSneaking(boolean par1) |
void |
setSprinting(boolean par1) |
void |
setVelocity(double par1,
double par3,
double par5) |
void |
setWorld(World par1World) |
boolean |
shouldDismountInWater(Entity rider)
If the rider should be dismounted from the entity when the entity goes under water
|
boolean |
shouldRenderInPass(int pass) |
boolean |
shouldRiderSit()
Used in model rendering to determine if the entity riding this entity should be in the 'sitting' position.
|
protected boolean |
shouldSetPosAfterLoading() |
java.lang.String |
toString() |
void |
travelToDimension(int par1) |
protected void |
updateFallState(double par1,
boolean par3) |
void |
updateRidden() |
void |
updateRiderPosition() |
protected abstract void |
writeEntityToNBT(NBTTagCompound var1) |
boolean |
writeMountToNBT(NBTTagCompound par1NBTTagCompound) |
void |
writeToNBT(NBTTagCompound par1NBTTagCompound) |
boolean |
writeToNBTOptional(NBTTagCompound par1NBTTagCompound) |
public double renderDistanceWeight
public boolean preventEntitySpawning
public Entity riddenByEntity
public Entity ridingEntity
public boolean forceSpawn
public World worldObj
public double prevPosX
public double prevPosY
public double prevPosZ
public double posX
public double posY
public double posZ
public double motionX
public double motionY
public double motionZ
public float rotationYaw
public float rotationPitch
public float prevRotationYaw
public float prevRotationPitch
public final AxisAlignedBB boundingBox
public boolean onGround
public boolean isCollidedHorizontally
public boolean isCollidedVertically
public boolean isCollided
public boolean velocityChanged
protected boolean isInWeb
public boolean field_70135_K
public boolean isDead
public float yOffset
public float width
public float height
public float prevDistanceWalkedModified
public float distanceWalkedModified
public float distanceWalkedOnStepModified
public float fallDistance
public double lastTickPosX
public double lastTickPosY
public double lastTickPosZ
public float ySize
public float stepHeight
public boolean noClip
public float entityCollisionReduction
protected java.util.Random rand
public int ticksExisted
public int fireResistance
protected boolean inWater
public int hurtResistantTime
protected boolean isImmuneToFire
protected DataWatcher dataWatcher
public boolean addedToChunk
public int chunkCoordX
public int chunkCoordY
public int chunkCoordZ
public int serverPosX
public int serverPosY
public int serverPosZ
public boolean ignoreFrustumCheck
public boolean isAirBorne
public int timeUntilPortal
protected boolean inPortal
protected int portalCounter
public int dimension
protected int teleportDirection
protected java.util.UUID entityUniqueID
public Entity.EnumEntitySize myEntitySize
public boolean captureDrops
public java.util.ArrayList<EntityItem> capturedDrops
protected java.util.HashMap<java.lang.String,IExtendedEntityProperties> extendedProperties
public Entity(World par1World)
public int getEntityId()
public void setEntityId(int p_145769_1_)
protected abstract void entityInit()
public DataWatcher getDataWatcher()
public boolean equals(java.lang.Object par1Obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected void preparePlayerToSpawn()
public void setDead()
protected void setSize(float par1, float par2)
protected void setRotation(float par1, float par2)
public void setPosition(double par1, double par3, double par5)
public void setAngles(float par1, float par2)
public void onUpdate()
public void onEntityUpdate()
public int getMaxInPortalTime()
protected void setOnFireFromLava()
public void setFire(int par1)
public void extinguish()
protected void kill()
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5)
public void moveEntity(double par1, double par3, double par5)
protected java.lang.String getSwimSound()
protected void func_145775_I()
protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_)
public void playSound(java.lang.String par1Str, float par2, float par3)
protected boolean canTriggerWalking()
protected void updateFallState(double par1, boolean par3)
public AxisAlignedBB getBoundingBox()
protected void dealFireDamage(int par1)
public final boolean isImmuneToFire()
protected void fall(float par1)
public boolean isWet()
public boolean isInWater()
public boolean handleWaterMovement()
protected java.lang.String getSplashSound()
public boolean isInsideOfMaterial(Material par1Material)
public float getEyeHeight()
public boolean handleLavaMovement()
public void moveFlying(float par1, float par2, float par3)
public int getBrightnessForRender(float par1)
public float getBrightness(float par1)
public void setWorld(World par1World)
public void setPositionAndRotation(double par1, double par3, double par5, float par7, float par8)
public void setLocationAndAngles(double par1, double par3, double par5, float par7, float par8)
public float getDistanceToEntity(Entity par1Entity)
public double getDistanceSq(double par1, double par3, double par5)
public double getDistance(double par1, double par3, double par5)
public double getDistanceSqToEntity(Entity par1Entity)
public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
public void applyEntityCollision(Entity par1Entity)
public void addVelocity(double par1, double par3, double par5)
protected void setBeenAttacked()
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
public boolean canBeCollidedWith()
public boolean canBePushed()
public void addToPlayerScore(Entity par1Entity, int par2)
public boolean isInRangeToRender3d(double p_145770_1_, double p_145770_3_, double p_145770_5_)
public boolean isInRangeToRenderDist(double par1)
public boolean writeMountToNBT(NBTTagCompound par1NBTTagCompound)
public boolean writeToNBTOptional(NBTTagCompound par1NBTTagCompound)
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
protected boolean shouldSetPosAfterLoading()
protected final java.lang.String getEntityString()
protected abstract void readEntityFromNBT(NBTTagCompound var1)
protected abstract void writeEntityToNBT(NBTTagCompound var1)
public void onChunkLoad()
protected NBTTagList newDoubleNBTList(double... par1ArrayOfDouble)
protected NBTTagList newFloatNBTList(float... par1ArrayOfFloat)
public EntityItem dropItem(Item p_145779_1_, int p_145779_2_)
public EntityItem func_145778_a(Item p_145778_1_, int p_145778_2_, float p_145778_3_)
public EntityItem entityDropItem(ItemStack par1ItemStack, float par2)
public float getShadowSize()
public boolean isEntityAlive()
public boolean isEntityInsideOpaqueBlock()
public boolean interactFirst(EntityPlayer par1EntityPlayer)
public AxisAlignedBB getCollisionBox(Entity par1Entity)
public void updateRidden()
public void updateRiderPosition()
public double getYOffset()
public double getMountedYOffset()
public void mountEntity(Entity par1Entity)
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
public float getCollisionBorderSize()
public Vec3 getLookVec()
public void setInPortal()
public int getPortalCooldown()
public void setVelocity(double par1, double par3, double par5)
public void handleHealthUpdate(byte par1)
public void performHurtAnimation()
public ItemStack[] getLastActiveItems()
public void setCurrentItemOrArmor(int par1, ItemStack par2ItemStack)
public boolean isBurning()
public boolean isRiding()
public boolean isSneaking()
public void setSneaking(boolean par1)
public boolean isSprinting()
public void setSprinting(boolean par1)
public boolean isInvisible()
public boolean isInvisibleToPlayer(EntityPlayer par1EntityPlayer)
public void setInvisible(boolean par1)
public boolean isEating()
public void setEating(boolean par1)
protected boolean getFlag(int par1)
protected void setFlag(int par1, boolean par2)
public int getAir()
public void setAir(int par1)
public void onStruckByLightning(EntityLightningBolt par1EntityLightningBolt)
public void onKillEntity(EntityLivingBase par1EntityLivingBase)
protected boolean func_145771_j(double p_145771_1_, double p_145771_3_, double p_145771_5_)
public void setInWeb()
public java.lang.String getCommandSenderName()
public Entity[] getParts()
public boolean isEntityEqual(Entity par1Entity)
public float getRotationYawHead()
public void setRotationYawHead(float par1)
public boolean canAttackWithItem()
public boolean hitByEntity(Entity par1Entity)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEntityInvulnerable()
public void copyLocationAndAnglesFrom(Entity par1Entity)
public void copyDataFrom(Entity par1Entity, boolean par2)
public void travelToDimension(int par1)
public float func_145772_a(Explosion p_145772_1_, World p_145772_2_, int p_145772_3_, int p_145772_4_, int p_145772_5_, Block p_145772_6_)
public boolean func_145774_a(Explosion p_145774_1_, World p_145774_2_, int p_145774_3_, int p_145774_4_, int p_145774_5_, Block p_145774_6_, float p_145774_7_)
public int getMaxSafePointTries()
public int getTeleportDirection()
public boolean doesEntityNotTriggerPressurePlate()
public void addEntityCrashInfo(CrashReportCategory par1CrashReportCategory)
public boolean canRenderOnFire()
public java.util.UUID getUniqueID()
public boolean isPushedByWater()
public IChatComponent func_145748_c_()
public void func_145781_i(int p_145781_1_)
public NBTTagCompound getEntityData()
public boolean shouldRiderSit()
public ItemStack getPickedResult(MovingObjectPosition target)
target
- The full target the player is looking atpublic java.util.UUID getPersistentID()
public final void resetEntityId()
public boolean shouldRenderInPass(int pass)
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
type
- The EnumCreatureType type this entity is evaluatingforSpawnCount
- If this is being invoked to check spawn count caps.public java.lang.String registerExtendedProperties(java.lang.String identifier, IExtendedEntityProperties properties)
identifier
- The identifier which you can use to retrieve these properties for the entity.properties
- The instanceof IExtendedProperties to registerpublic IExtendedEntityProperties getExtendedProperties(java.lang.String identifier)
identifier
- The key that identifies the extended properties.public boolean canRiderInteract()
public boolean shouldDismountInWater(Entity rider)
rider
- The entity that is riding