public abstract class Entity extends java.lang.Object implements ICommandSender
Modifier and Type | Method and Description |
---|---|
void |
addChatMessage(IChatComponent message) |
void |
addEntityCrashInfo(CrashReportCategory category) |
void |
addToPlayerScore(Entity entityIn,
int amount) |
void |
addVelocity(double x,
double y,
double z) |
void |
applyEntityCollision(Entity entityIn) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canAttackWithItem() |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
boolean |
canRenderOnFire() |
boolean |
canRiderInteract()
If a rider of this entity can interact with this entity.
|
protected boolean |
canTriggerWalking() |
boolean |
canUseCommand(int permLevel,
java.lang.String commandName) |
void |
copyDataFromOld(Entity p_180432_1_) |
void |
copyLocationAndAnglesFrom(Entity entityIn) |
protected void |
createRunningParticles() |
protected void |
dealFireDamage(int amount) |
protected void |
doBlockCollisions() |
boolean |
doesEntityNotTriggerPressurePlate() |
EntityItem |
dropItem(Item itemIn,
int size) |
EntityItem |
dropItemWithOffset(Item itemIn,
int size,
float p_145778_3_) |
EntityItem |
entityDropItem(ItemStack itemStackIn,
float offsetY) |
protected abstract void |
entityInit() |
boolean |
equals(java.lang.Object p_equals_1_) |
void |
extinguish() |
void |
fall(float distance,
float damageMultiplier) |
void |
func_145781_i(int p_145781_1_) |
CommandResultStats |
func_174807_aT() |
protected void |
func_174815_a(EntityLivingBase p_174815_1_,
Entity p_174815_2_) |
boolean |
func_174816_a(Explosion p_174816_1_,
World worldIn,
BlockPos p_174816_3_,
IBlockState p_174816_4_,
float p_174816_5_) |
void |
func_174817_o(Entity p_174817_1_) |
NBTTagCompound |
func_174819_aU() |
protected HoverEvent |
func_174823_aP() |
boolean |
func_174825_a(EntityPlayer p_174825_1_,
Vec3 p_174825_2_) |
boolean |
func_174827_a(EntityPlayerMP p_174827_1_) |
void |
func_174834_g(NBTTagCompound p_174834_1_) |
void |
func_180426_a(double p_180426_1_,
double p_180426_3_,
double p_180426_5_,
float p_180426_7_,
float p_180426_8_,
int p_180426_9_,
boolean p_180426_10_) |
boolean |
func_180427_aV() |
protected void |
func_180433_a(double p_180433_1_,
boolean p_180433_3_,
Block p_180433_4_,
BlockPos p_180433_5_) |
int |
getAir() |
boolean |
getAlwaysRenderNameTag() |
boolean |
getAlwaysRenderNameTagForRender() |
AxisAlignedBB |
getBoundingBox() |
float |
getBrightness(float p_70013_1_) |
int |
getBrightnessForRender(float p_70070_1_) |
float |
getCollisionBorderSize() |
AxisAlignedBB |
getCollisionBox(Entity entityIn) |
Entity |
getCommandSenderEntity() |
java.lang.String |
getCustomNameTag() |
DataWatcher |
getDataWatcher() |
IChatComponent |
getDisplayName() |
double |
getDistance(double x,
double y,
double z) |
double |
getDistanceSq(BlockPos p_174818_1_) |
double |
getDistanceSq(double x,
double y,
double z) |
double |
getDistanceSqToCenter(BlockPos p_174831_1_) |
double |
getDistanceSqToEntity(Entity entityIn) |
float |
getDistanceToEntity(Entity entityIn) |
AxisAlignedBB |
getEntityBoundingBox() |
NBTTagCompound |
getEntityData()
Returns a NBTTagCompound that can be used to store custom data for this entity.
|
int |
getEntityId() |
protected java.lang.String |
getEntityString() |
World |
getEntityWorld() |
float |
getExplosionResistance(Explosion p_180428_1_,
World worldIn,
BlockPos p_180428_3_,
IBlockState p_180428_4_) |
IExtendedEntityProperties |
getExtendedProperties(java.lang.String identifier)
Gets the extended properties identified by the passed in key
|
float |
getEyeHeight() |
protected boolean |
getFlag(int flag) |
EnumFacing |
getHorizontalFacing() |
ItemStack[] |
getInventory() |
Vec3 |
getLook(float p_70676_1_) |
Vec3 |
getLookVec() |
int |
getMaxFallHeight() |
int |
getMaxInPortalTime() |
double |
getMountedYOffset() |
java.lang.String |
getName() |
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() |
BlockPos |
getPosition() |
Vec3 |
getPositionEyes(float p_174824_1_) |
Vec3 |
getPositionVector() |
float |
getRotationYawHead() |
protected java.lang.String |
getSplashSound() |
protected java.lang.String |
getSwimSound() |
int |
getTeleportDirection() |
java.util.UUID |
getUniqueID() |
protected Vec3 |
getVectorForRotation(float pitch,
float yaw) |
double |
getYOffset() |
void |
handleHealthUpdate(byte p_70103_1_) |
boolean |
handleWaterMovement() |
boolean |
hasCustomName() |
int |
hashCode() |
boolean |
hitByEntity(Entity entityIn) |
boolean |
interactFirst(EntityPlayer playerIn) |
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 entityIn) |
boolean |
isEntityInsideOpaqueBlock() |
boolean |
isEntityInvulnerable(DamageSource p_180431_1_) |
boolean |
isImmuneToFire() |
boolean |
isInLava() |
boolean |
isInRangeToRender3d(double x,
double y,
double z) |
boolean |
isInRangeToRenderDist(double distance) |
boolean |
isInsideOfMaterial(Material materialIn) |
boolean |
isInvisible() |
boolean |
isInvisibleToPlayer(EntityPlayer player) |
boolean |
isInWater() |
boolean |
isOffsetPositionInLiquid(double x,
double y,
double z) |
boolean |
isOutsideBorder() |
boolean |
isPushedByWater() |
boolean |
isRiding() |
boolean |
isSilent() |
boolean |
isSneaking() |
boolean |
isSprinting() |
boolean |
isWet() |
protected void |
kill() |
void |
mountEntity(Entity entityIn) |
void |
moveEntity(double x,
double y,
double z) |
void |
moveFlying(float strafe,
float forward,
float friction) |
void |
moveToBlockPosAndAngles(BlockPos p_174828_1_,
float p_174828_2_,
float p_174828_3_) |
protected NBTTagList |
newDoubleNBTList(double... numbers) |
protected NBTTagList |
newFloatNBTList(float... numbers) |
void |
onChunkLoad() |
void |
onCollideWithPlayer(EntityPlayer entityIn) |
void |
onEntityUpdate() |
void |
onKillCommand() |
void |
onKillEntity(EntityLivingBase entityLivingIn) |
void |
onStruckByLightning(EntityLightningBolt lightningBolt) |
void |
onUpdate() |
void |
performHurtAnimation() |
void |
playSound(java.lang.String name,
float volume,
float pitch) |
protected void |
playStepSound(BlockPos p_180429_1_,
Block p_180429_2_) |
protected void |
preparePlayerToSpawn() |
protected boolean |
pushOutOfBlocks(double x,
double y,
double z) |
MovingObjectPosition |
rayTrace(double p_174822_1_,
float p_174822_3_) |
protected abstract void |
readEntityFromNBT(NBTTagCompound tagCompund) |
void |
readFromNBT(NBTTagCompound tagCompund) |
java.lang.String |
registerExtendedProperties(java.lang.String identifier,
IExtendedEntityProperties properties)
Register the instance of IExtendedProperties into the entity's collection.
|
boolean |
replaceItemInInventory(int p_174820_1_,
ItemStack p_174820_2_) |
void |
resetEntityId()
Reset the entity ID to a new value.
|
protected void |
resetHeight() |
boolean |
sendCommandFeedback() |
void |
setAir(int air) |
void |
setAlwaysRenderNameTag(boolean p_174805_1_) |
void |
setAngles(float yaw,
float pitch) |
protected void |
setBeenAttacked() |
void |
setCommandStat(CommandResultStats.Type type,
int amount) |
void |
setCurrentItemOrArmor(int slotIn,
ItemStack stack) |
void |
setCustomNameTag(java.lang.String p_96094_1_) |
void |
setDead() |
void |
setEating(boolean eating) |
void |
setEntityBoundingBox(AxisAlignedBB p_174826_1_) |
void |
setEntityId(int id) |
void |
setFire(int seconds) |
protected void |
setFlag(int flag,
boolean set) |
void |
setInPortal() |
void |
setInvisible(boolean invisible) |
void |
setInWeb() |
void |
setLocationAndAngles(double x,
double y,
double z,
float yaw,
float pitch) |
protected void |
setOnFireFromLava() |
void |
setOutsideBorder(boolean p_174821_1_) |
void |
setPosition(double x,
double y,
double z) |
void |
setPositionAndRotation(double x,
double y,
double z,
float yaw,
float pitch) |
void |
setPositionAndUpdate(double x,
double y,
double z) |
protected void |
setRotation(float yaw,
float pitch) |
void |
setRotationYawHead(float rotation) |
void |
setSilent(boolean isSilent) |
protected void |
setSize(float width,
float height) |
void |
setSneaking(boolean sneaking) |
void |
setSprinting(boolean sprinting) |
void |
setVelocity(double x,
double y,
double z) |
void |
setWorld(World worldIn) |
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() |
void |
spawnRunningParticles() |
java.lang.String |
toString() |
void |
travelToDimension(int dimensionId) |
void |
updateRidden() |
void |
updateRiderPosition() |
protected abstract void |
writeEntityToNBT(NBTTagCompound tagCompound) |
boolean |
writeMountToNBT(NBTTagCompound tagCompund) |
void |
writeToNBT(NBTTagCompound tagCompund) |
boolean |
writeToNBTOptional(NBTTagCompound tagCompund) |
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 boolean onGround
public boolean isCollidedHorizontally
public boolean isCollidedVertically
public boolean isCollided
public boolean velocityChanged
protected boolean isInWeb
public boolean isDead
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 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 firstUpdate
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 boolean captureDrops
public java.util.ArrayList<EntityItem> capturedDrops
protected java.util.HashMap<java.lang.String,IExtendedEntityProperties> extendedProperties
public Entity(World worldIn)
public int getEntityId()
public void setEntityId(int id)
public void onKillCommand()
protected abstract void entityInit()
public DataWatcher getDataWatcher()
public boolean equals(java.lang.Object p_equals_1_)
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 width, float height)
protected void setRotation(float yaw, float pitch)
public void setPosition(double x, double y, double z)
public void setAngles(float yaw, float pitch)
public void onUpdate()
public void onEntityUpdate()
public int getMaxInPortalTime()
protected void setOnFireFromLava()
public void setFire(int seconds)
public void extinguish()
protected void kill()
public boolean isOffsetPositionInLiquid(double x, double y, double z)
public void moveEntity(double x, double y, double z)
protected java.lang.String getSwimSound()
protected void doBlockCollisions()
public void playSound(java.lang.String name, float volume, float pitch)
public boolean isSilent()
public void setSilent(boolean isSilent)
protected boolean canTriggerWalking()
protected void func_180433_a(double p_180433_1_, boolean p_180433_3_, Block p_180433_4_, BlockPos p_180433_5_)
public AxisAlignedBB getBoundingBox()
protected void dealFireDamage(int amount)
public final boolean isImmuneToFire()
public void fall(float distance, float damageMultiplier)
public boolean isWet()
public boolean isInWater()
public boolean handleWaterMovement()
protected void resetHeight()
public void spawnRunningParticles()
protected void createRunningParticles()
protected java.lang.String getSplashSound()
public boolean isInsideOfMaterial(Material materialIn)
public boolean isInLava()
public void moveFlying(float strafe, float forward, float friction)
public int getBrightnessForRender(float p_70070_1_)
public float getBrightness(float p_70013_1_)
public void setWorld(World worldIn)
public void setPositionAndRotation(double x, double y, double z, float yaw, float pitch)
public void moveToBlockPosAndAngles(BlockPos p_174828_1_, float p_174828_2_, float p_174828_3_)
public void setLocationAndAngles(double x, double y, double z, float yaw, float pitch)
public float getDistanceToEntity(Entity entityIn)
public double getDistanceSq(double x, double y, double z)
public double getDistanceSq(BlockPos p_174818_1_)
public double getDistanceSqToCenter(BlockPos p_174831_1_)
public double getDistance(double x, double y, double z)
public double getDistanceSqToEntity(Entity entityIn)
public void onCollideWithPlayer(EntityPlayer entityIn)
public void applyEntityCollision(Entity entityIn)
public void addVelocity(double x, double y, double z)
protected void setBeenAttacked()
public boolean attackEntityFrom(DamageSource source, float amount)
public Vec3 getLook(float p_70676_1_)
protected final Vec3 getVectorForRotation(float pitch, float yaw)
public Vec3 getPositionEyes(float p_174824_1_)
public MovingObjectPosition rayTrace(double p_174822_1_, float p_174822_3_)
public boolean canBeCollidedWith()
public boolean canBePushed()
public void addToPlayerScore(Entity entityIn, int amount)
public boolean isInRangeToRender3d(double x, double y, double z)
public boolean isInRangeToRenderDist(double distance)
public boolean writeMountToNBT(NBTTagCompound tagCompund)
public boolean writeToNBTOptional(NBTTagCompound tagCompund)
public void writeToNBT(NBTTagCompound tagCompund)
public void readFromNBT(NBTTagCompound tagCompund)
protected boolean shouldSetPosAfterLoading()
protected final java.lang.String getEntityString()
protected abstract void readEntityFromNBT(NBTTagCompound tagCompund)
protected abstract void writeEntityToNBT(NBTTagCompound tagCompound)
public void onChunkLoad()
protected NBTTagList newDoubleNBTList(double... numbers)
protected NBTTagList newFloatNBTList(float... numbers)
public EntityItem dropItem(Item itemIn, int size)
public EntityItem dropItemWithOffset(Item itemIn, int size, float p_145778_3_)
public EntityItem entityDropItem(ItemStack itemStackIn, float offsetY)
public boolean isEntityAlive()
public boolean isEntityInsideOpaqueBlock()
public boolean interactFirst(EntityPlayer playerIn)
public AxisAlignedBB getCollisionBox(Entity entityIn)
public void updateRidden()
public void updateRiderPosition()
public double getYOffset()
public double getMountedYOffset()
public void mountEntity(Entity entityIn)
public void func_180426_a(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
public float getCollisionBorderSize()
public Vec3 getLookVec()
public void setInPortal()
public int getPortalCooldown()
public void setVelocity(double x, double y, double z)
public void handleHealthUpdate(byte p_70103_1_)
public void performHurtAnimation()
public ItemStack[] getInventory()
public void setCurrentItemOrArmor(int slotIn, ItemStack stack)
public boolean isBurning()
public boolean isRiding()
public boolean isSneaking()
public void setSneaking(boolean sneaking)
public boolean isSprinting()
public void setSprinting(boolean sprinting)
public boolean isInvisible()
public boolean isInvisibleToPlayer(EntityPlayer player)
public void setInvisible(boolean invisible)
public boolean isEating()
public void setEating(boolean eating)
protected boolean getFlag(int flag)
protected void setFlag(int flag, boolean set)
public int getAir()
public void setAir(int air)
public void onStruckByLightning(EntityLightningBolt lightningBolt)
public void onKillEntity(EntityLivingBase entityLivingIn)
protected boolean pushOutOfBlocks(double x, double y, double z)
public void setInWeb()
public java.lang.String getName()
getName
in interface ICommandSender
public Entity[] getParts()
public boolean isEntityEqual(Entity entityIn)
public float getRotationYawHead()
public void setRotationYawHead(float rotation)
public boolean canAttackWithItem()
public boolean hitByEntity(Entity entityIn)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEntityInvulnerable(DamageSource p_180431_1_)
public void copyLocationAndAnglesFrom(Entity entityIn)
public void copyDataFromOld(Entity p_180432_1_)
public void travelToDimension(int dimensionId)
public float getExplosionResistance(Explosion p_180428_1_, World worldIn, BlockPos p_180428_3_, IBlockState p_180428_4_)
public boolean func_174816_a(Explosion p_174816_1_, World worldIn, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_)
public int getMaxFallHeight()
public int getTeleportDirection()
public boolean doesEntityNotTriggerPressurePlate()
public void addEntityCrashInfo(CrashReportCategory category)
public boolean canRenderOnFire()
public java.util.UUID getUniqueID()
public boolean isPushedByWater()
public IChatComponent getDisplayName()
getDisplayName
in interface ICommandSender
public void setCustomNameTag(java.lang.String p_96094_1_)
public java.lang.String getCustomNameTag()
public boolean hasCustomName()
public void setAlwaysRenderNameTag(boolean p_174805_1_)
public boolean getAlwaysRenderNameTag()
public void setPositionAndUpdate(double x, double y, double z)
public boolean getAlwaysRenderNameTagForRender()
public void func_145781_i(int p_145781_1_)
public EnumFacing getHorizontalFacing()
protected HoverEvent func_174823_aP()
public boolean func_174827_a(EntityPlayerMP p_174827_1_)
public AxisAlignedBB getEntityBoundingBox()
public void setEntityBoundingBox(AxisAlignedBB p_174826_1_)
public float getEyeHeight()
public boolean isOutsideBorder()
public void setOutsideBorder(boolean p_174821_1_)
public boolean replaceItemInInventory(int p_174820_1_, ItemStack p_174820_2_)
public void addChatMessage(IChatComponent message)
addChatMessage
in interface ICommandSender
public boolean canUseCommand(int permLevel, java.lang.String commandName)
canUseCommand
in interface ICommandSender
public BlockPos getPosition()
getPosition
in interface ICommandSender
public Vec3 getPositionVector()
getPositionVector
in interface ICommandSender
public World getEntityWorld()
getEntityWorld
in interface ICommandSender
public Entity getCommandSenderEntity()
getCommandSenderEntity
in interface ICommandSender
public boolean sendCommandFeedback()
sendCommandFeedback
in interface ICommandSender
public void setCommandStat(CommandResultStats.Type type, int amount)
setCommandStat
in interface ICommandSender
public CommandResultStats func_174807_aT()
public void func_174817_o(Entity p_174817_1_)
public NBTTagCompound func_174819_aU()
public void func_174834_g(NBTTagCompound p_174834_1_)
public boolean func_174825_a(EntityPlayer p_174825_1_, Vec3 p_174825_2_)
public boolean func_180427_aV()
protected void func_174815_a(EntityLivingBase p_174815_1_, Entity p_174815_2_)
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