public abstract class Entity extends java.lang.Object implements ICommandSender, ICapabilitySerializable<NBTTagCompound>
Modifier and Type | Field and Description |
---|---|
boolean |
addedToChunk
Has this entity been added to the chunk its within
|
protected java.lang.String |
cachedUniqueIdString |
java.util.ArrayList<EntityItem> |
capturedDrops |
boolean |
captureDrops |
int |
chunkCoordX |
int |
chunkCoordY |
int |
chunkCoordZ |
protected EntityDataManager |
dataManager |
int |
dimension
Which dimension the player is in (-1 = the Nether, 0 = normal world)
|
float |
distanceWalkedModified
The distance walked multiplied by 0.6
|
float |
distanceWalkedOnStepModified |
float |
entityCollisionReduction
Reduces the velocity applied by entity collisions by the specified percent.
|
protected java.util.UUID |
entityUniqueID |
float |
fallDistance |
protected boolean |
firstUpdate |
protected static DataParameter<java.lang.Byte> |
FLAGS |
boolean |
forceSpawn |
protected boolean |
glowing |
float |
height
How high this entity is considered to be
|
int |
hurtResistantTime
Remaining time an entity will be "immune" to further damage after being hurt.
|
boolean |
ignoreFrustumCheck
Render entity even if it is outside the camera frustum.
|
protected boolean |
inPortal
Whether the entity is inside a Portal
|
protected boolean |
inWater
Whether this entity is currently inside of water (if it handles water movement that is)
|
boolean |
isAirBorne |
boolean |
isCollided
True if after a move this entity has collided with something either vertically or horizontally
|
boolean |
isCollidedHorizontally
True if after a move this entity has collided with something on X- or Z-axis
|
boolean |
isCollidedVertically
True if after a move this entity has collided with something on Y-axis
|
boolean |
isDead
gets set by setEntityDead, so this must be the flag whether an Entity is dead (inactive may be better term)
|
protected boolean |
isImmuneToFire |
protected boolean |
isInWeb |
protected BlockPos |
lastPortalPos
The position of the last portal the entity was in
|
protected Vec3d |
lastPortalVec
A horizontal vector related to the position of the last portal the entity was in
|
double |
lastTickPosX
The entity's X coordinate at the previous tick, used to calculate position during rendering routines
|
double |
lastTickPosY
The entity's Y coordinate at the previous tick, used to calculate position during rendering routines
|
double |
lastTickPosZ
The entity's Z coordinate at the previous tick, used to calculate position during rendering routines
|
double |
motionX
Entity motion X
|
double |
motionY
Entity motion Y
|
double |
motionZ
Entity motion Z
|
boolean |
noClip
Whether this entity won't clip with collision or not (make note it won't disable gravity)
|
boolean |
onGround |
protected int |
portalCounter |
double |
posX
Entity position X
|
double |
posY
Entity position Y
|
double |
posZ
Entity position Z
|
float |
prevDistanceWalkedModified
The previous ticks distance walked multiplied by 0.6
|
boolean |
preventEntitySpawning
Blocks entities from spawning when they do their AABB check to make sure the spot is clear of entities that can
prevent spawning.
|
double |
prevPosX |
double |
prevPosY |
double |
prevPosZ |
float |
prevRotationPitch |
float |
prevRotationYaw |
protected java.util.Random |
rand |
protected int |
rideCooldown |
float |
rotationPitch
Entity rotation Pitch
|
float |
rotationYaw
Entity rotation Yaw
|
long |
serverPosX |
long |
serverPosY |
long |
serverPosZ |
float |
stepHeight
How high this entity can step up when running into a block to try to get over it (currently make note the entity
will always step up this amount and not just the amount needed)
|
protected EnumFacing |
teleportDirection
A direction related to the position of the last portal the entity was in
|
int |
ticksExisted
How many ticks has this entity had ran since being alive
|
int |
timeUntilPortal |
boolean |
updateBlocked
Setting this to true will prevent the world from calling
onUpdate() for this entity. |
boolean |
velocityChanged |
float |
width
How wide this entity is considered to be
|
World |
world
Reference to the World object.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntityCrashInfo(CrashReportCategory category) |
protected void |
addPassenger(Entity passenger) |
boolean |
addTag(java.lang.String tag) |
void |
addToPlayerScore(Entity entityIn,
int amount)
Adds to the players score.
|
void |
addTrackingPlayer(EntityPlayerMP player)
Add the given player to the list of players tracking this entity.
|
void |
addVelocity(double x,
double y,
double z)
Adds to the current velocity of the entity.
|
protected void |
applyEnchantments(EntityLivingBase entityLivingBaseIn,
Entity entityIn) |
void |
applyEntityCollision(Entity entityIn)
Applies a velocity to the entities, to push them away from eachother.
|
void |
applyOrientationToEntity(Entity entityToUpdate)
Applies this entity's orientation (pitch/yaw) to another entity.
|
EnumActionResult |
applyPlayerInteraction(EntityPlayer player,
Vec3d vec,
EnumHand stack)
Applies the given player interaction to this Entity.
|
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
canBeAttackedWithItem()
Returns true if it's possible to attack this entity with an item.
|
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
boolean |
canBePushed()
Returns true if this entity should push and be pushed by other entities when colliding.
|
protected boolean |
canBeRidden(Entity entityIn) |
protected boolean |
canFitPassenger(Entity passenger) |
boolean |
canPassengerSteer() |
boolean |
canRenderOnFire()
Return whether this entity should be rendered as on fire.
|
boolean |
canRiderInteract()
If a rider of this entity can interact with this entity.
|
boolean |
canTrample(World world,
Block block,
BlockPos pos,
float fallDistance)
|
protected boolean |
canTriggerWalking()
returns if this entity triggers Block.onEntityWalking on the blocks they walk on.
|
boolean |
canUseCommand(int permLevel,
java.lang.String commandName)
Returns
true if the CommandSender is allowed to execute the command, false if not |
Entity |
changeDimension(int dimensionIn) |
void |
copyLocationAndAnglesFrom(Entity entityIn)
Sets this entity's location and angles to the location and angles of the passed in entity.
|
protected void |
createRunningParticles() |
protected void |
dealFireDamage(int amount)
Will deal the specified amount of fire damage to the entity if the entity isn't immune to fire damage.
|
protected void |
decrementTimeUntilPortal()
Decrements the counter for the remaining time until the entity may use a portal again.
|
void |
deserializeNBT(NBTTagCompound nbt) |
void |
dismountRidingEntity() |
protected void |
doBlockCollisions() |
boolean |
doesEntityNotTriggerPressurePlate()
Return whether this entity should NOT trigger a pressure plate or a tripwire.
|
EntityItem |
dropItem(Item itemIn,
int size) |
EntityItem |
dropItemWithOffset(Item itemIn,
int size,
float offsetY) |
EntityItem |
entityDropItem(ItemStack stack,
float offsetY)
Drops an item at the position of the entity.
|
protected abstract void |
entityInit() |
boolean |
equals(java.lang.Object p_equals_1_) |
void |
extinguish()
Removes fire from entity.
|
void |
fall(float distance,
float damageMultiplier) |
EnumFacing |
getAdjustedHorizontalFacing()
Gets the horizontal facing direction of this Entity, adjusted to take specially-treated entity types into
account.
|
int |
getAir() |
boolean |
getAlwaysRenderNameTag() |
boolean |
getAlwaysRenderNameTagForRender() |
java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
float |
getBrightness(float partialTicks)
Gets how bright this entity is.
|
int |
getBrightnessForRender(float partialTicks) |
java.lang.String |
getCachedUniqueIdString() |
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
float |
getCollisionBorderSize() |
AxisAlignedBB |
getCollisionBoundingBox()
Returns the collision bounding box for this entity
|
AxisAlignedBB |
getCollisionBox(Entity entityIn)
Returns a boundingBox used to collide the entity with other entities and blocks.
|
Entity |
getCommandSenderEntity()
Returns the entity associated with the command sender.
|
CommandResultStats |
getCommandStats() |
Entity |
getControllingPassenger()
For vehicles, the first passenger is generally considered the controller and "drives" the vehicle.
|
java.lang.String |
getCustomNameTag() |
EntityDataManager |
getDataManager() |
ITextComponent |
getDisplayName()
Get the formatted ChatComponent that will be used for the sender's username in chat
|
double |
getDistance(double x,
double y,
double z)
Gets the distance to the position.
|
double |
getDistanceSq(BlockPos pos) |
double |
getDistanceSq(double x,
double y,
double z)
Gets the squared distance to the position.
|
double |
getDistanceSqToCenter(BlockPos pos) |
double |
getDistanceSqToEntity(Entity entityIn)
Returns the squared distance to the entity.
|
float |
getDistanceToEntity(Entity entityIn)
Returns the distance to the entity.
|
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()
Returns the string that identifies this Entity's class
|
World |
getEntityWorld()
Get the world, if available.
|
java.lang.Iterable<ItemStack> |
getEquipmentAndArmor() |
float |
getExplosionResistance(Explosion explosionIn,
World worldIn,
BlockPos pos,
IBlockState blockStateIn)
Explosion resistance of a block relative to this entity
|
float |
getEyeHeight() |
protected int |
getFireImmuneTicks() |
protected boolean |
getFlag(int flag)
Returns true if the flag is active for the entity.
|
Vec3d |
getForward() |
java.lang.Iterable<ItemStack> |
getHeldEquipment() |
EnumFacing |
getHorizontalFacing()
Gets the horizontal facing direction of this Entity.
|
protected HoverEvent |
getHoverEvent() |
boolean |
getIsInvulnerable() |
Vec3d |
getLastPortalVec() |
Vec3d |
getLook(float partialTicks)
interpolated look vector
|
Vec3d |
getLookVec()
returns a (normalized) vector of where this entity is looking
|
Entity |
getLowestRidingEntity() |
int |
getMaxFallHeight()
The maximum height from where the entity is alowed to jump (used in pathfinder)
|
int |
getMaxInPortalTime()
Return the amount of time this entity should stay in a portal before being transported.
|
float |
getMirroredYaw(Mirror transformMirror)
Transforms the entity's current yaw with the given Mirror and returns it.
|
double |
getMountedYOffset()
Returns the Y offset from the entity's position for any entity riding this one.
|
java.lang.String |
getName()
Get the name of this object.
|
Entity[] |
getParts()
Return the Entity parts making up this Entity (currently only for dragons)
|
java.util.List<Entity> |
getPassengers() |
java.util.UUID |
getPersistentID() |
ItemStack |
getPickedResult(RayTraceResult target)
Called when a user uses the creative pick block button on this entity.
|
Vec2f |
getPitchYaw()
returns the Entity's pitch and yaw as a Vec2f
|
int |
getPortalCooldown()
Return the amount of cooldown before this entity can use a portal again.
|
BlockPos |
getPosition()
Get the position in the world.
|
Vec3d |
getPositionEyes(float partialTicks) |
Vec3d |
getPositionVector()
Get the position vector.
|
EnumPushReaction |
getPushReaction() |
java.util.Collection<Entity> |
getRecursivePassengers()
Recursively collects the passengers of this entity.
|
<T extends Entity> |
getRecursivePassengersByType(java.lang.Class<T> entityClass)
Recursively collects the passengers of this entity with type denoted by the given class.
|
AxisAlignedBB |
getRenderBoundingBox()
Gets the bounding box of this Entity, adjusted to take auxiliary entities into account (e.g.
|
static double |
getRenderDistanceWeight() |
Entity |
getRidingEntity()
Get entity this is riding
|
float |
getRotatedYaw(Rotation transformRotation)
Transforms the entity's current yaw with the given Rotation and returns it.
|
float |
getRotationYawHead() |
MinecraftServer |
getServer()
Get the Minecraft server instance
|
SoundCategory |
getSoundCategory() |
protected SoundEvent |
getSplashSound() |
protected SoundEvent |
getSwimSound() |
java.util.Set<java.lang.String> |
getTags() |
Team |
getTeam() |
EnumFacing |
getTeleportDirection() |
java.util.UUID |
getUniqueID()
Returns the UUID of this entity.
|
protected Vec3d |
getVectorForRotation(float pitch,
float yaw)
Creates a Vec3 using the pitch and yaw of the entities rotation.
|
double |
getYOffset()
Returns the Y Offset of this entity.
|
void |
handleStatusUpdate(byte id) |
boolean |
handleWaterMovement()
Returns if this entity is in water and will end up adding the waters velocity to the entity
|
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
boolean |
hasCustomName()
Returns true if this thing is named
|
int |
hashCode() |
boolean |
hasNoGravity() |
boolean |
hitByEntity(Entity entityIn)
Called when a player attacks an entity.
|
boolean |
ignoreItemEntityData() |
boolean |
isBeingRidden()
If at least 1 entity is riding this one
|
boolean |
isBurning()
Returns true if the entity is on fire.
|
boolean |
isCreatureType(EnumCreatureType type,
boolean forSpawnCount)
Returns true if the entity is of the @link{EnumCreatureType} provided
|
boolean |
isEntityAlive()
Checks whether target entity is alive.
|
boolean |
isEntityEqual(Entity entityIn)
Returns true if Entity argument is equal to this Entity
|
boolean |
isEntityInsideOpaqueBlock()
Checks if this entity is inside of an opaque block
|
boolean |
isEntityInvulnerable(DamageSource source)
Returns whether this Entity is invulnerable to the given DamageSource.
|
boolean |
isGlowing() |
boolean |
isImmuneToExplosions() |
boolean |
isImmuneToFire() |
boolean |
isInLava() |
boolean |
isInRangeToRender3d(double x,
double y,
double z) |
boolean |
isInRangeToRenderDist(double distance)
Checks if the entity is in range to render.
|
boolean |
isInsideOfMaterial(Material materialIn)
Checks if the current block the entity is within of the specified material type
|
boolean |
isInvisible() |
boolean |
isInvisibleToPlayer(EntityPlayer player)
Only used by renderer in EntityLivingBase subclasses.
|
boolean |
isInWater()
Checks if this entity is inside water (if inWater field is true as a result of handleWaterMovement() returning
true)
|
boolean |
isNonBoss()
Returns false if this Entity is a boss, true otherwise.
|
boolean |
isOffsetPositionInLiquid(double x,
double y,
double z)
Checks if the offset position from the entity's current position is inside of a liquid.
|
boolean |
isOnSameTeam(Entity entityIn)
Returns whether this Entity is on the same team as the given Entity.
|
boolean |
isOnScoreboardTeam(Team teamIn)
Returns whether this Entity is on the given scoreboard team.
|
boolean |
isOutsideBorder() |
boolean |
isPassenger(Entity entityIn) |
boolean |
isPushedByWater() |
boolean |
isRiding() |
boolean |
isRidingOrBeingRiddenBy(Entity entityIn) |
boolean |
isRidingSameEntity(Entity entityIn) |
boolean |
isSilent() |
boolean |
isSneaking()
Returns if this entity is sneaking.
|
boolean |
isSpectatedByPlayer(EntityPlayerMP player) |
boolean |
isSprinting()
Get if the Entity is sprinting.
|
boolean |
isWet()
Checks if this entity is either in water or on an open air block in rain (used in wolves).
|
protected void |
kill()
sets the dead flag.
|
void |
move(MoverType type,
double x,
double y,
double z)
Tries to move the entity towards the specified location.
|
void |
moveRelative(float strafe,
float forward,
float friction)
Used in both water and by flying objects
|
void |
moveToBlockPosAndAngles(BlockPos pos,
float rotationYawIn,
float rotationPitchIn) |
protected NBTTagList |
newDoubleNBTList(double... numbers)
creates a NBT list from the array of doubles passed to this function
|
protected NBTTagList |
newFloatNBTList(float... numbers)
Returns a new NBTTagList filled with the specified floats
|
void |
notifyDataManagerChange(DataParameter<?> key) |
void |
onCollideWithPlayer(EntityPlayer entityIn)
Called by a player entity when they collide with an entity
|
void |
onEntityUpdate()
Gets called every tick from main Entity class
|
void |
onKillCommand()
Called by the /kill command.
|
void |
onKillEntity(EntityLivingBase entityLivingIn)
This method gets called when the entity kills another one.
|
void |
onStruckByLightning(EntityLightningBolt lightningBolt)
Called when a lightning bolt hits the entity.
|
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
performHurtAnimation()
Setups the entity to do the hurt animation.
|
void |
playSound(SoundEvent soundIn,
float volume,
float pitch) |
protected void |
playStepSound(BlockPos pos,
Block blockIn) |
protected void |
preparePlayerToSpawn()
Keeps moving the entity up so it isn't colliding with blocks and other requirements for this entity to be spawned
(only actually used on players though its also on Entity)
|
boolean |
processInitialInteract(EntityPlayer player,
EnumHand hand) |
protected boolean |
pushOutOfBlocks(double x,
double y,
double z) |
RayTraceResult |
rayTrace(double blockReachDistance,
float partialTicks) |
protected abstract void |
readEntityFromNBT(NBTTagCompound compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
readFromNBT(NBTTagCompound compound)
Reads the entity from NBT (calls an abstract helper method to read specialized data)
|
static void |
registerFixes(DataFixer fixer) |
protected void |
removePassenger(Entity passenger) |
void |
removePassengers() |
boolean |
removeTag(java.lang.String tag) |
void |
removeTrackingPlayer(EntityPlayerMP player)
Removes the given player from the list of players tracking this entity.
|
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
resetEntityId()
Reset the entity ID to a new value.
|
protected void |
resetHeight()
sets the players height back to normal after doing things like sleeping and dieing
|
void |
resetPositionToBB()
Resets the entity's position to the center (planar) and bottom (vertical) points of its bounding box.
|
boolean |
sendCommandFeedback()
Returns true if the command sender should be sent feedback about executed commands
|
void |
sendMessage(ITextComponent component)
Send a chat message to the CommandSender
|
NBTTagCompound |
serializeNBT() |
void |
setAir(int air) |
void |
setAlwaysRenderNameTag(boolean alwaysRenderNameTag) |
protected void |
setBeenAttacked()
Sets that this entity has been attacked.
|
void |
setCommandStat(CommandResultStats.Type type,
int amount) |
void |
setCommandStats(Entity entityIn)
Set the CommandResultStats from the entity
|
void |
setCustomNameTag(java.lang.String name)
Sets the custom name tag for this entity
|
void |
setDead()
Will get destroyed next tick.
|
void |
setDropItemsWhenDead(boolean dropWhenDead)
Sets whether this entity should drop its items when setDead() is called.
|
void |
setEntityBoundingBox(AxisAlignedBB bb) |
void |
setEntityId(int id) |
void |
setEntityInvulnerable(boolean isInvulnerable)
Sets whether this Entity is invulnerable.
|
void |
setFire(int seconds)
Sets entity to burn for x amount of seconds, cannot lower amount of existing fire.
|
protected void |
setFlag(int flag,
boolean set)
Enable or disable a entity flag, see getEntityFlag to read the know flags.
|
void |
setGlowing(boolean glowingIn) |
void |
setInvisible(boolean invisible) |
void |
setInWeb()
Sets the Entity inside a web block.
|
void |
setItemStackToSlot(EntityEquipmentSlot slotIn,
ItemStack stack) |
void |
setLocationAndAngles(double x,
double y,
double z,
float yaw,
float pitch)
Sets the location and Yaw/Pitch of an entity in the world
|
void |
setNoGravity(boolean noGravity) |
protected void |
setOnFireFromLava()
Called whenever the entity is walking inside of lava.
|
void |
setOutsideBorder(boolean outsideBorder) |
void |
setPortal(BlockPos pos)
Marks the entity as being inside a portal, activating teleportation logic in onEntityUpdate() in the following
tick(s).
|
void |
setPosition(double x,
double y,
double z)
Sets the x,y,z of the entity from the given parameters.
|
void |
setPositionAndRotation(double x,
double y,
double z,
float yaw,
float pitch)
Sets the entity's position and rotation.
|
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
Set the position and rotation values directly without any clamping.
|
void |
setPositionAndUpdate(double x,
double y,
double z)
Sets the position of the entity and updates the 'last' variables
|
boolean |
setPositionNonDirty() |
static void |
setRenderDistanceWeight(double renderDistWeight) |
void |
setRenderYawOffset(float offset)
Set the render yaw offset
|
protected void |
setRotation(float yaw,
float pitch)
Sets the rotation of the entity.
|
void |
setRotationYawHead(float rotation)
Sets the head's yaw rotation of the entity.
|
void |
setSilent(boolean isSilent)
When set to true the entity will not play sounds.
|
protected void |
setSize(float width,
float height)
Sets the width and height of the entity.
|
void |
setSneaking(boolean sneaking)
Sets the sneaking flag.
|
void |
setSprinting(boolean sprinting)
Set sprinting switch for Entity.
|
void |
setUniqueId(java.util.UUID uniqueIdIn) |
void |
setVelocity(double x,
double y,
double z)
Updates the velocity of the entity to a new value.
|
void |
setWorld(World worldIn)
Sets the reference to the World object.
|
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()
Attempts to create sprinting particles if the entity is sprinting and not in water.
|
boolean |
startRiding(Entity entityIn) |
boolean |
startRiding(Entity entityIn,
boolean force) |
java.lang.String |
toString() |
void |
turn(float yaw,
float pitch)
Adds 15% to the entity's yaw and subtracts 15% from the pitch.
|
protected void |
updateFallState(double y,
boolean onGroundIn,
IBlockState state,
BlockPos pos) |
void |
updatePassenger(Entity passenger) |
void |
updateRidden()
Handles updating while being ridden by an entity
|
boolean |
verifyExplosion(Explosion explosionIn,
World worldIn,
BlockPos pos,
IBlockState blockStateIn,
float p_174816_5_) |
protected abstract void |
writeEntityToNBT(NBTTagCompound compound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
NBTTagCompound |
writeToNBT(NBTTagCompound compound) |
boolean |
writeToNBTAtomically(NBTTagCompound compound)
Attempts to write this Entity to the given NBTTagCompound.
|
boolean |
writeToNBTOptional(NBTTagCompound compound)
Either write this entity to the NBT tag given and return true, or return false without doing anything.
|
public boolean preventEntitySpawning
protected int rideCooldown
public boolean forceSpawn
public World world
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
protected boolean inWater
public int hurtResistantTime
protected boolean firstUpdate
protected boolean isImmuneToFire
protected EntityDataManager dataManager
protected static final DataParameter<java.lang.Byte> FLAGS
public boolean addedToChunk
public int chunkCoordX
public int chunkCoordY
public int chunkCoordZ
public long serverPosX
public long serverPosY
public long serverPosZ
public boolean ignoreFrustumCheck
public boolean isAirBorne
public int timeUntilPortal
protected boolean inPortal
protected int portalCounter
public int dimension
protected BlockPos lastPortalPos
protected Vec3d lastPortalVec
protected EnumFacing teleportDirection
protected java.util.UUID entityUniqueID
protected java.lang.String cachedUniqueIdString
protected boolean glowing
public boolean updateBlocked
onUpdate()
for this entity.public boolean captureDrops
public java.util.ArrayList<EntityItem> capturedDrops
public Entity(World worldIn)
public int getEntityId()
public void setEntityId(int id)
public java.util.Set<java.lang.String> getTags()
public boolean addTag(java.lang.String tag)
public boolean removeTag(java.lang.String tag)
public void onKillCommand()
protected abstract void entityInit()
public EntityDataManager getDataManager()
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()
public void setDropItemsWhenDead(boolean dropWhenDead)
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 turn(float yaw, float pitch)
public void onUpdate()
public void onEntityUpdate()
protected void decrementTimeUntilPortal()
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 move(MoverType type, double x, double y, double z)
public void resetPositionToBB()
protected SoundEvent getSwimSound()
protected SoundEvent getSplashSound()
protected void doBlockCollisions()
public void playSound(SoundEvent soundIn, float volume, float pitch)
public boolean isSilent()
public void setSilent(boolean isSilent)
public boolean hasNoGravity()
public void setNoGravity(boolean noGravity)
protected boolean canTriggerWalking()
protected void updateFallState(double y, boolean onGroundIn, IBlockState state, BlockPos pos)
public AxisAlignedBB getCollisionBoundingBox()
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()
public boolean isInsideOfMaterial(Material materialIn)
public boolean isInLava()
public void moveRelative(float strafe, float forward, float friction)
public int getBrightnessForRender(float partialTicks)
public float getBrightness(float partialTicks)
public void setWorld(World worldIn)
public void setPositionAndRotation(double x, double y, double z, float yaw, float pitch)
public void moveToBlockPosAndAngles(BlockPos pos, float rotationYawIn, float rotationPitchIn)
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 pos)
public double getDistanceSqToCenter(BlockPos pos)
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 Vec3d getLook(float partialTicks)
protected final Vec3d getVectorForRotation(float pitch, float yaw)
public Vec3d getPositionEyes(float partialTicks)
public RayTraceResult rayTrace(double blockReachDistance, float partialTicks)
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 writeToNBTAtomically(NBTTagCompound compound)
public boolean writeToNBTOptional(NBTTagCompound compound)
public static void registerFixes(DataFixer fixer)
public NBTTagCompound writeToNBT(NBTTagCompound compound)
public void readFromNBT(NBTTagCompound compound)
protected boolean shouldSetPosAfterLoading()
protected final java.lang.String getEntityString()
protected abstract void readEntityFromNBT(NBTTagCompound compound)
protected abstract void writeEntityToNBT(NBTTagCompound compound)
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 offsetY)
public EntityItem entityDropItem(ItemStack stack, float offsetY)
public boolean isEntityAlive()
public boolean isEntityInsideOpaqueBlock()
public boolean processInitialInteract(EntityPlayer player, EnumHand hand)
public AxisAlignedBB getCollisionBox(Entity entityIn)
public void updateRidden()
public void updatePassenger(Entity passenger)
public void applyOrientationToEntity(Entity entityToUpdate)
public double getYOffset()
public double getMountedYOffset()
public boolean startRiding(Entity entityIn)
public boolean startRiding(Entity entityIn, boolean force)
protected boolean canBeRidden(Entity entityIn)
public void removePassengers()
public void dismountRidingEntity()
protected void addPassenger(Entity passenger)
protected void removePassenger(Entity passenger)
protected boolean canFitPassenger(Entity passenger)
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
public float getCollisionBorderSize()
public Vec3d getLookVec()
public Vec2f getPitchYaw()
public Vec3d getForward()
public void setPortal(BlockPos pos)
public int getPortalCooldown()
public void setVelocity(double x, double y, double z)
public void handleStatusUpdate(byte id)
public void performHurtAnimation()
public java.lang.Iterable<ItemStack> getHeldEquipment()
public java.lang.Iterable<ItemStack> getArmorInventoryList()
public java.lang.Iterable<ItemStack> getEquipmentAndArmor()
public void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack)
public boolean isBurning()
public boolean isRiding()
public boolean isBeingRidden()
public boolean isSneaking()
public void setSneaking(boolean sneaking)
public boolean isSprinting()
public void setSprinting(boolean sprinting)
public boolean isGlowing()
public void setGlowing(boolean glowingIn)
public boolean isInvisible()
public boolean isInvisibleToPlayer(EntityPlayer player)
public Team getTeam()
public boolean isOnSameTeam(Entity entityIn)
public boolean isOnScoreboardTeam(Team teamIn)
public void setInvisible(boolean invisible)
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 void setRenderYawOffset(float offset)
public boolean canBeAttackedWithItem()
public boolean hitByEntity(Entity entityIn)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEntityInvulnerable(DamageSource source)
public boolean getIsInvulnerable()
public void setEntityInvulnerable(boolean isInvulnerable)
public void copyLocationAndAnglesFrom(Entity entityIn)
public Entity changeDimension(int dimensionIn)
public boolean isNonBoss()
public float getExplosionResistance(Explosion explosionIn, World worldIn, BlockPos pos, IBlockState blockStateIn)
public boolean verifyExplosion(Explosion explosionIn, World worldIn, BlockPos pos, IBlockState blockStateIn, float p_174816_5_)
public int getMaxFallHeight()
public Vec3d getLastPortalVec()
public EnumFacing getTeleportDirection()
public boolean doesEntityNotTriggerPressurePlate()
public void addEntityCrashInfo(CrashReportCategory category)
public void setUniqueId(java.util.UUID uniqueIdIn)
public boolean canRenderOnFire()
public java.util.UUID getUniqueID()
public java.lang.String getCachedUniqueIdString()
public boolean isPushedByWater()
public static double getRenderDistanceWeight()
public static void setRenderDistanceWeight(double renderDistWeight)
public ITextComponent getDisplayName()
getDisplayName
in interface ICommandSender
public void setCustomNameTag(java.lang.String name)
public java.lang.String getCustomNameTag()
public boolean hasCustomName()
public void setAlwaysRenderNameTag(boolean alwaysRenderNameTag)
public boolean getAlwaysRenderNameTag()
public void setPositionAndUpdate(double x, double y, double z)
public void notifyDataManagerChange(DataParameter<?> key)
public boolean getAlwaysRenderNameTagForRender()
public EnumFacing getHorizontalFacing()
public EnumFacing getAdjustedHorizontalFacing()
protected HoverEvent getHoverEvent()
public boolean isSpectatedByPlayer(EntityPlayerMP player)
public AxisAlignedBB getEntityBoundingBox()
public AxisAlignedBB getRenderBoundingBox()
public void setEntityBoundingBox(AxisAlignedBB bb)
public float getEyeHeight()
public boolean isOutsideBorder()
public void setOutsideBorder(boolean outsideBorder)
public boolean replaceItemInInventory(int inventorySlot, ItemStack itemStackIn)
public void sendMessage(ITextComponent component)
sendMessage
in interface ICommandSender
public boolean canUseCommand(int permLevel, java.lang.String commandName)
true
if the CommandSender is allowed to execute the command, false
if notcanUseCommand
in interface ICommandSender
public BlockPos getPosition()
null
is not allowed! If you are not an entity in the world, return
the coordinates 0, 0, 0getPosition
in interface ICommandSender
public Vec3d getPositionVector()
null
is not allowed! If you are not an entity in the world, return 0.0D,
0.0D, 0.0DgetPositionVector
in interface ICommandSender
public World getEntityWorld()
null
is not allowed! If you are not an entity in the world, return
the overworldgetEntityWorld
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 MinecraftServer getServer()
getServer
in interface ICommandSender
public CommandResultStats getCommandStats()
public void setCommandStats(Entity entityIn)
public EnumActionResult applyPlayerInteraction(EntityPlayer player, Vec3d vec, EnumHand stack)
public boolean isImmuneToExplosions()
protected void applyEnchantments(EntityLivingBase entityLivingBaseIn, Entity entityIn)
public NBTTagCompound getEntityData()
public boolean shouldRiderSit()
public ItemStack getPickedResult(RayTraceResult 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 boolean canRiderInteract()
public boolean shouldDismountInWater(Entity rider)
rider
- The entity that is ridingpublic boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProvider
hasCapability
in interface ICapabilityProvider
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'ICapabilityProvider.hasCapability(Capability, EnumFacing)
would return false.public void deserializeNBT(NBTTagCompound nbt)
deserializeNBT
in interface INBTSerializable<NBTTagCompound>
public NBTTagCompound serializeNBT()
serializeNBT
in interface INBTSerializable<NBTTagCompound>
public boolean canTrample(World world, Block block, BlockPos pos, float fallDistance)
world
- The world in which the block will be trampledblock
- The block being testedpos
- The block posfallDistance
- The fall distancetrue
if this entity can trample, false
otherwisepublic void addTrackingPlayer(EntityPlayerMP player)
public void removeTrackingPlayer(EntityPlayerMP player)
addTrackingPlayer(net.minecraft.entity.player.EntityPlayerMP)
for
more information on tracking.public float getRotatedYaw(Rotation transformRotation)
public float getMirroredYaw(Mirror transformMirror)
public boolean ignoreItemEntityData()
public boolean setPositionNonDirty()
public Entity getControllingPassenger()
public java.util.List<Entity> getPassengers()
public boolean isPassenger(Entity entityIn)
public java.util.Collection<Entity> getRecursivePassengers()
public <T extends Entity> java.util.Collection<T> getRecursivePassengersByType(java.lang.Class<T> entityClass)
public Entity getLowestRidingEntity()
public boolean isRidingSameEntity(Entity entityIn)
public boolean isRidingOrBeingRiddenBy(Entity entityIn)
public boolean canPassengerSteer()
public Entity getRidingEntity()
public EnumPushReaction getPushReaction()
public SoundCategory getSoundCategory()
protected int getFireImmuneTicks()