public abstract class Entity extends java.lang.Object implements ICommandSender, ICapabilitySerializable<NBTTagCompound>
Modifier and Type | Field and Description |
---|---|
boolean |
addedToChunk |
private static DataParameter<java.lang.Integer> |
AIR |
private AxisAlignedBB |
boundingBox |
protected java.lang.String |
cachedUniqueIdString |
private CapabilityDispatcher |
capabilities |
java.util.ArrayList<EntityItem> |
capturedDrops |
boolean |
captureDrops |
int |
chunkCoordX |
int |
chunkCoordY |
int |
chunkCoordZ |
private CommandResultStats |
cmdResultStats |
boolean |
collided |
boolean |
collidedHorizontally |
boolean |
collidedVertically |
private static DataParameter<java.lang.String> |
CUSTOM_NAME |
private static DataParameter<java.lang.Boolean> |
CUSTOM_NAME_VISIBLE |
private NBTTagCompound |
customEntityData
Forge: Used to store custom data for each entity.
|
protected EntityDataManager |
dataManager |
int |
dimension |
float |
distanceWalkedModified |
float |
distanceWalkedOnStepModified |
private static java.util.List<ItemStack> |
EMPTY_EQUIPMENT |
float |
entityCollisionReduction |
private int |
entityId |
protected java.util.UUID |
entityUniqueID |
float |
fallDistance |
private int |
fire |
protected boolean |
firstUpdate |
protected static DataParameter<java.lang.Byte> |
FLAGS |
boolean |
forceSpawn |
protected boolean |
glowing |
float |
height |
int |
hurtResistantTime |
boolean |
ignoreFrustumCheck |
protected boolean |
inPortal |
private boolean |
invulnerable |
protected boolean |
inWater |
private boolean |
isAddedToWorld
Internal use for keeping track of entities that are tracked by a world, to
allow guarantees that entity position changes will force a chunk load, avoiding
potential issues with entity desyncing and bad chunk data.
|
boolean |
isAirBorne |
boolean |
isDead |
protected boolean |
isImmuneToFire |
protected boolean |
isInWeb |
private boolean |
isOutsideBorder |
private boolean |
isPositionDirty |
protected BlockPos |
lastPortalPos |
protected Vec3d |
lastPortalVec |
double |
lastTickPosX |
double |
lastTickPosY |
double |
lastTickPosZ |
private static org.apache.logging.log4j.Logger |
LOGGER |
double |
motionX |
double |
motionY |
double |
motionZ |
private static int |
nextEntityID |
private float |
nextFlap |
private int |
nextStepDistance |
private static DataParameter<java.lang.Boolean> |
NO_GRAVITY |
boolean |
noClip |
boolean |
onGround |
private double[] |
pistonDeltas |
private long |
pistonDeltasGameTime |
protected int |
portalCounter |
double |
posX |
double |
posY |
double |
posZ |
float |
prevDistanceWalkedModified |
boolean |
preventEntitySpawning |
double |
prevPosX |
double |
prevPosY |
double |
prevPosZ |
float |
prevRotationPitch |
float |
prevRotationYaw |
protected java.util.Random |
rand |
private static double |
renderDistanceWeight |
private java.util.List<Entity> |
riddenByEntities |
protected int |
rideCooldown |
private Entity |
ridingEntity |
float |
rotationPitch |
float |
rotationYaw |
long |
serverPosX |
long |
serverPosY |
long |
serverPosZ |
private static DataParameter<java.lang.Boolean> |
SILENT |
float |
stepHeight |
private java.util.Set<java.lang.String> |
tags |
protected EnumFacing |
teleportDirection |
int |
ticksExisted |
int |
timeUntilPortal |
boolean |
updateBlocked
Setting this to true will prevent the world from calling
onUpdate() for this entity. |
boolean |
velocityChanged |
float |
width |
World |
world |
private static AxisAlignedBB |
ZERO_AABB |
Modifier and Type | Method and Description |
---|---|
void |
addEntityCrashInfo(CrashReportCategory category) |
protected void |
addPassenger(Entity passenger) |
boolean |
addTag(java.lang.String tag) |
void |
addTrackingPlayer(EntityPlayerMP player) |
void |
addVelocity(double x,
double y,
double z) |
protected void |
applyEnchantments(EntityLivingBase entityLivingBaseIn,
Entity entityIn) |
void |
applyEntityCollision(Entity entityIn) |
void |
applyOrientationToEntity(Entity entityToUpdate) |
EnumActionResult |
applyPlayerInteraction(EntityPlayer player,
Vec3d vec,
EnumHand hand) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
void |
awardKillScore(Entity p_191956_1_,
int p_191956_2_,
DamageSource p_191956_3_) |
boolean |
canBeAttackedWithItem() |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
protected boolean |
canBeRidden(Entity entityIn) |
boolean |
canExplosionDestroyBlock(Explosion explosionIn,
World worldIn,
BlockPos pos,
IBlockState blockStateIn,
float p_174816_5_) |
protected boolean |
canFitPassenger(Entity passenger) |
boolean |
canPassengerSteer() |
boolean |
canRenderOnFire() |
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() |
boolean |
canUseCommand(int permLevel,
java.lang.String commandName) |
Entity |
changeDimension(int dimensionIn) |
Entity |
changeDimension(int dimensionIn,
ITeleporter teleporter) |
private void |
copyDataFromOld(Entity entityIn) |
void |
copyLocationAndAnglesFrom(Entity entityIn) |
protected void |
createRunningParticles() |
protected void |
dealFireDamage(int amount) |
protected void |
decrementTimeUntilPortal() |
void |
deserializeNBT(NBTTagCompound nbt) |
void |
dismountRidingEntity() |
protected void |
doBlockCollisions() |
boolean |
doesEntityNotTriggerPressurePlate() |
protected void |
doWaterSplashEffect() |
EntityItem |
dropItem(Item itemIn,
int size) |
EntityItem |
dropItemWithOffset(Item itemIn,
int size,
float offsetY) |
EntityItem |
entityDropItem(ItemStack stack,
float offsetY) |
protected abstract void |
entityInit() |
boolean |
equals(java.lang.Object p_equals_1_) |
void |
extinguish() |
void |
fall(float distance,
float damageMultiplier) |
EnumFacing |
getAdjustedHorizontalFacing() |
int |
getAir() |
boolean |
getAlwaysRenderNameTag() |
boolean |
getAlwaysRenderNameTagForRender() |
java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
float |
getBrightness() |
int |
getBrightnessForRender() |
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() |
AxisAlignedBB |
getCollisionBox(Entity entityIn) |
Entity |
getCommandSenderEntity() |
CommandResultStats |
getCommandStats() |
Entity |
getControllingPassenger() |
java.lang.String |
getCustomNameTag() |
EntityDataManager |
getDataManager() |
ITextComponent |
getDisplayName() |
double |
getDistance(double x,
double y,
double z) |
float |
getDistance(Entity entityIn) |
double |
getDistanceSq(BlockPos pos) |
double |
getDistanceSq(double x,
double y,
double z) |
double |
getDistanceSq(Entity entityIn) |
double |
getDistanceSqToCenter(BlockPos pos) |
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() |
java.lang.Iterable<ItemStack> |
getEquipmentAndArmor() |
float |
getExplosionResistance(Explosion explosionIn,
World worldIn,
BlockPos pos,
IBlockState blockStateIn) |
float |
getEyeHeight() |
protected int |
getFireImmuneTicks() |
protected boolean |
getFlag(int flag) |
Vec3d |
getForward() |
java.lang.Iterable<ItemStack> |
getHeldEquipment() |
EnumFacing |
getHorizontalFacing() |
protected HoverEvent |
getHoverEvent() |
boolean |
getIsInvulnerable() |
Vec3d |
getLastPortalVec() |
Vec3d |
getLook(float partialTicks) |
Vec3d |
getLookVec() |
Entity |
getLowestRidingEntity() |
int |
getMaxFallHeight() |
int |
getMaxInPortalTime() |
float |
getMirroredYaw(Mirror transformMirror) |
double |
getMountedYOffset() |
java.lang.String |
getName() |
Entity[] |
getParts() |
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() |
int |
getPortalCooldown() |
BlockPos |
getPosition() |
Vec3d |
getPositionEyes(float partialTicks) |
Vec3d |
getPositionVector() |
EnumPushReaction |
getPushReaction() |
java.util.Collection<Entity> |
getRecursivePassengers() |
<T extends Entity> |
getRecursivePassengersByType(java.lang.Class<T> entityClass) |
private <T extends Entity> |
getRecursivePassengersByType(java.lang.Class<T> entityClass,
java.util.Set<T> theSet) |
AxisAlignedBB |
getRenderBoundingBox() |
static double |
getRenderDistanceWeight() |
Entity |
getRidingEntity() |
float |
getRotatedYaw(Rotation transformRotation) |
float |
getRotationYawHead() |
MinecraftServer |
getServer() |
SoundCategory |
getSoundCategory() |
protected SoundEvent |
getSplashSound() |
protected SoundEvent |
getSwimSound() |
java.util.Set<java.lang.String> |
getTags() |
Team |
getTeam() |
EnumFacing |
getTeleportDirection() |
java.util.UUID |
getUniqueID() |
protected Vec3d |
getVectorForRotation(float pitch,
float yaw) |
double |
getYOffset() |
void |
handleStatusUpdate(byte id) |
boolean |
handleWaterMovement() |
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
boolean |
hasCustomName() |
int |
hashCode() |
boolean |
hasNoGravity() |
boolean |
hitByEntity(Entity entityIn) |
boolean |
ignoreItemEntityData() |
boolean |
isAddedToWorld()
Gets whether this entity has been added to a world (for tracking).
|
boolean |
isBeingRidden() |
boolean |
isBurning() |
boolean |
isCreatureType(EnumCreatureType type,
boolean forSpawnCount)
Returns true if the entity is of the @link{EnumCreatureType} provided
|
boolean |
isEntityAlive() |
boolean |
isEntityEqual(Entity entityIn) |
boolean |
isEntityInsideOpaqueBlock() |
boolean |
isEntityInvulnerable(DamageSource source) |
boolean |
isGlowing() |
boolean |
isImmuneToExplosions() |
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() |
private boolean |
isLiquidPresentInAABB(AxisAlignedBB bb) |
boolean |
isNonBoss() |
boolean |
isOffsetPositionInLiquid(double x,
double y,
double z) |
boolean |
isOnSameTeam(Entity entityIn) |
boolean |
isOnScoreboardTeam(Team teamIn) |
boolean |
isOutsideBorder() |
boolean |
isOverWater() |
boolean |
isPassenger(Entity entityIn) |
boolean |
isPushedByWater() |
boolean |
isRiding() |
boolean |
isRidingOrBeingRiddenBy(Entity entityIn) |
boolean |
isRidingSameEntity(Entity entityIn) |
boolean |
isSilent() |
boolean |
isSneaking() |
boolean |
isSpectatedByPlayer(EntityPlayerMP player) |
boolean |
isSprinting() |
boolean |
isWet() |
protected boolean |
makeFlySound() |
protected void |
markVelocityChanged() |
void |
move(MoverType type,
double x,
double y,
double z) |
void |
moveRelative(float strafe,
float up,
float forward,
float friction) |
void |
moveToBlockPosAndAngles(BlockPos pos,
float rotationYawIn,
float rotationPitchIn) |
protected NBTTagList |
newDoubleNBTList(double... numbers) |
protected NBTTagList |
newFloatNBTList(float... numbers) |
void |
notifyDataManagerChange(DataParameter<?> key) |
void |
onAddedToWorld()
Called after the entity has been added to the world's
ticking list.
|
void |
onCollideWithPlayer(EntityPlayer entityIn) |
void |
onEntityUpdate() |
protected void |
onInsideBlock(IBlockState p_191955_1_) |
void |
onKillCommand() |
void |
onKillEntity(EntityLivingBase entityLivingIn) |
void |
onRemovedFromWorld()
Called after the entity has been removed to the world's
ticking list.
|
void |
onStruckByLightning(EntityLightningBolt lightningBolt) |
void |
onUpdate() |
protected void |
outOfWorld() |
void |
performHurtAnimation() |
protected float |
playFlySound(float p_191954_1_) |
void |
playSound(SoundEvent soundIn,
float volume,
float pitch) |
protected void |
playStepSound(BlockPos pos,
Block blockIn) |
protected void |
preparePlayerToSpawn() |
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) |
void |
readFromNBT(NBTTagCompound compound) |
static void |
registerFixes(DataFixer fixer) |
protected void |
removePassenger(Entity passenger) |
void |
removePassengers() |
boolean |
removeTag(java.lang.String tag) |
void |
removeTrackingPlayer(EntityPlayerMP player) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
resetEntityId()
Deprecated.
|
void |
resetPositionToBB() |
boolean |
sendCommandFeedback() |
void |
sendMessage(ITextComponent component) |
NBTTagCompound |
serializeNBT() |
void |
setAir(int air) |
void |
setAlwaysRenderNameTag(boolean alwaysRenderNameTag) |
void |
setCommandStat(CommandResultStats.Type type,
int amount) |
void |
setCommandStats(Entity entityIn) |
void |
setCustomNameTag(java.lang.String name) |
void |
setDead() |
void |
setDropItemsWhenDead(boolean dropWhenDead) |
void |
setEntityBoundingBox(AxisAlignedBB bb) |
void |
setEntityId(int id) |
void |
setEntityInvulnerable(boolean isInvulnerable) |
void |
setFire(int seconds) |
protected void |
setFlag(int flag,
boolean set) |
void |
setGlowing(boolean glowingIn) |
void |
setInvisible(boolean invisible) |
void |
setInWeb() |
void |
setItemStackToSlot(EntityEquipmentSlot slotIn,
ItemStack stack) |
void |
setLocationAndAngles(double x,
double y,
double z,
float yaw,
float pitch) |
void |
setNoGravity(boolean noGravity) |
protected void |
setOnFireFromLava() |
void |
setOutsideBorder(boolean outsideBorder) |
void |
setPortal(BlockPos pos) |
void |
setPosition(double x,
double y,
double z) |
void |
setPositionAndRotation(double x,
double y,
double z,
float yaw,
float pitch) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport) |
void |
setPositionAndUpdate(double x,
double y,
double z) |
boolean |
setPositionNonDirty() |
static void |
setRenderDistanceWeight(double renderDistWeight) |
void |
setRenderYawOffset(float offset) |
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 |
setUniqueId(java.util.UUID uniqueIdIn) |
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() |
boolean |
startRiding(Entity entityIn) |
boolean |
startRiding(Entity entityIn,
boolean force) |
java.lang.String |
toString() |
void |
turn(float yaw,
float pitch) |
protected void |
updateFallState(double y,
boolean onGroundIn,
IBlockState state,
BlockPos pos) |
void |
updatePassenger(Entity passenger) |
void |
updateRidden() |
protected abstract void |
writeEntityToNBT(NBTTagCompound compound) |
NBTTagCompound |
writeToNBT(NBTTagCompound compound) |
boolean |
writeToNBTAtomically(NBTTagCompound compound) |
boolean |
writeToNBTOptional(NBTTagCompound compound) |
private static final org.apache.logging.log4j.Logger LOGGER
private static final java.util.List<ItemStack> EMPTY_EQUIPMENT
private static final AxisAlignedBB ZERO_AABB
private static double renderDistanceWeight
private static int nextEntityID
private int entityId
public boolean preventEntitySpawning
private final java.util.List<Entity> riddenByEntities
protected int rideCooldown
private Entity ridingEntity
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
private AxisAlignedBB boundingBox
public boolean onGround
public boolean collidedHorizontally
public boolean collidedVertically
public boolean collided
public boolean velocityChanged
protected boolean isInWeb
private boolean isOutsideBorder
public boolean isDead
public float width
public float height
public float prevDistanceWalkedModified
public float distanceWalkedModified
public float distanceWalkedOnStepModified
public float fallDistance
private int nextStepDistance
private float nextFlap
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
private int fire
protected boolean inWater
public int hurtResistantTime
protected boolean firstUpdate
protected boolean isImmuneToFire
protected EntityDataManager dataManager
protected static final DataParameter<java.lang.Byte> FLAGS
private static final DataParameter<java.lang.Integer> AIR
private static final DataParameter<java.lang.String> CUSTOM_NAME
private static final DataParameter<java.lang.Boolean> CUSTOM_NAME_VISIBLE
private static final DataParameter<java.lang.Boolean> SILENT
private static final DataParameter<java.lang.Boolean> NO_GRAVITY
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
private boolean invulnerable
protected java.util.UUID entityUniqueID
protected java.lang.String cachedUniqueIdString
private final CommandResultStats cmdResultStats
protected boolean glowing
private final java.util.Set<java.lang.String> tags
private boolean isPositionDirty
private final double[] pistonDeltas
private long pistonDeltasGameTime
public boolean updateBlocked
onUpdate()
for this entity.private NBTTagCompound customEntityData
public boolean captureDrops
public java.util.ArrayList<EntityItem> capturedDrops
private CapabilityDispatcher capabilities
private boolean isAddedToWorld
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 outOfWorld()
public boolean isOffsetPositionInLiquid(double x, double y, double z)
private boolean isLiquidPresentInAABB(AxisAlignedBB bb)
public void move(MoverType type, double x, double y, double z)
public void resetPositionToBB()
protected SoundEvent getSwimSound()
protected SoundEvent getSplashSound()
protected void doBlockCollisions()
protected void onInsideBlock(IBlockState p_191955_1_)
protected float playFlySound(float p_191954_1_)
protected boolean makeFlySound()
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)
@Nullable 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 isOverWater()
public boolean handleWaterMovement()
protected void doWaterSplashEffect()
public void spawnRunningParticles()
protected void createRunningParticles()
public boolean isInsideOfMaterial(Material materialIn)
public boolean isInLava()
public void moveRelative(float strafe, float up, float forward, float friction)
public int getBrightnessForRender()
public float getBrightness()
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 getDistance(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 getDistanceSq(Entity entityIn)
public void onCollideWithPlayer(EntityPlayer entityIn)
public void applyEntityCollision(Entity entityIn)
public void addVelocity(double x, double y, double z)
protected void markVelocityChanged()
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)
@Nullable public RayTraceResult rayTrace(double blockReachDistance, float partialTicks)
public boolean canBeCollidedWith()
public boolean canBePushed()
public void awardKillScore(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_)
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()
@Nullable 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)
@Nullable public EntityItem dropItem(Item itemIn, int size)
@Nullable public EntityItem dropItemWithOffset(Item itemIn, int size, float offsetY)
@Nullable public EntityItem entityDropItem(ItemStack stack, float offsetY)
public boolean isEntityAlive()
public boolean isEntityInsideOpaqueBlock()
public boolean processInitialInteract(EntityPlayer player, EnumHand hand)
@Nullable 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)
@Nullable 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
@Nullable 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)
private void copyDataFromOld(Entity entityIn)
@Nullable public Entity changeDimension(int dimensionIn)
@Nullable public Entity changeDimension(int dimensionIn, ITeleporter teleporter)
public boolean isNonBoss()
public float getExplosionResistance(Explosion explosionIn, World worldIn, BlockPos pos, IBlockState blockStateIn)
public boolean canExplosionDestroyBlock(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)
canUseCommand
in interface ICommandSender
public BlockPos getPosition()
getPosition
in interface ICommandSender
public Vec3d 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
@Nullable public MinecraftServer getServer()
getServer
in interface ICommandSender
public CommandResultStats getCommandStats()
public void setCommandStats(Entity entityIn)
public EnumActionResult applyPlayerInteraction(EntityPlayer player, Vec3d vec, EnumHand hand)
public boolean isImmuneToExplosions()
protected void applyEnchantments(EntityLivingBase entityLivingBaseIn, Entity entityIn)
public final boolean isAddedToWorld()
World.onEntityAdded(Entity)
and
World.onEntityRemoved(Entity)
.public void onAddedToWorld()
public void onRemovedFromWorld()
public NBTTagCompound getEntityData()
public boolean shouldRiderSit()
public ItemStack getPickedResult(RayTraceResult target)
target
- The full target the player is looking atpublic java.util.UUID getPersistentID()
@Deprecated 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, @Nullable EnumFacing facing)
ICapabilityProvider
ICapabilityProvider.getCapability(Capability, EnumFacing)
.
Basically, this method functions analogously to Map.containsKey(Object)
.
Example: A Pipe getting a cover placed on one side causing it lose the Inventory attachment function for that side.
This is a light weight version of getCapability, intended for metadata uses.
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'ICapabilityProvider.getCapability(Capability, EnumFacing)
must not return null.@Nullable public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
ICapabilityProvider
Basically, this method functions analogously to Map.get(Object)
.
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 true.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)
public float getRotatedYaw(Rotation transformRotation)
public float getMirroredYaw(Mirror transformMirror)
public boolean ignoreItemEntityData()
public boolean setPositionNonDirty()
@Nullable 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)
private <T extends Entity> void getRecursivePassengersByType(java.lang.Class<T> entityClass, java.util.Set<T> theSet)
public Entity getLowestRidingEntity()
public boolean isRidingSameEntity(Entity entityIn)
public boolean isRidingOrBeingRiddenBy(Entity entityIn)
public boolean canPassengerSteer()
@Nullable public Entity getRidingEntity()
public EnumPushReaction getPushReaction()
public SoundCategory getSoundCategory()
protected int getFireImmuneTicks()