public class EntityItem extends Entity
Modifier and Type | Field and Description |
---|---|
int |
age
The age of this EntityItem (used to animate it up and down as well as expire it)
|
int |
delayBeforeCanPickup |
float |
hoverStart
The EntityItem's random initial float height.
|
int |
lifespan
The maximum age of this EntityItem.
|
addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, noClip, onGround, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize
Constructor and Description |
---|
EntityItem(World par1World) |
EntityItem(World par1World,
double par2,
double par4,
double par6) |
EntityItem(World par1World,
double par2,
double par4,
double par6,
ItemStack par8ItemStack) |
Modifier and Type | Method and Description |
---|---|
boolean |
attackEntityFrom(DamageSource par1DamageSource,
float par2)
Called when the entity is attacked.
|
boolean |
canAttackWithItem()
If returns false, the item will not inflict any damage against entities.
|
boolean |
combineItems(EntityItem par1EntityItem)
Tries to merge this item with the item passed as the parameter.
|
ItemStack |
getEntityItem()
Returns the ItemStack corresponding to the Entity (Note: if no item exists, will log an error but still return an
ItemStack containing Block.stone)
|
String |
getEntityName()
Gets the username of the entity.
|
boolean |
handleWaterMovement()
Returns if this entity is in water and will end up adding the waters velocity to the entity
|
void |
onCollideWithPlayer(EntityPlayer par1EntityPlayer)
Called by a player entity when they collide with an entity
|
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
setAgeToCreativeDespawnTime()
sets the age of the item so that it'll despawn one minute after it has been dropped (instead of five).
|
void |
setEntityItemStack(ItemStack par1ItemStack)
Sets the ItemStack for this entity
|
void |
travelToDimension(int par1)
Teleports the entity to another dimension.
|
void |
writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
addEntityCrashInfo, addToPlayerScore, addVelocity, applyEntityCollision, canBeCollidedWith, canBePushed, canRenderOnFire, canRiderInteract, copyDataFrom, copyLocationAndAnglesFrom, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAir, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getExtendedProperties, getEyeHeight, getLastActiveItems, getLookVec, getMaxInPortalTime, getMaxSafePointTries, getMountedYOffset, getParts, getPersistentID, getPickedResult, getPortalCooldown, getRotationYawHead, getShadowSize, getTeleportDirection, getTranslatedEntityName, getUniqueID, getYOffset, handleHealthUpdate, handleLavaMovement, hashCode, hitByEntity, interactFirst, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, onChunkLoad, onEntityUpdate, onKillEntity, onStruckByLightning, performHurtAnimation, playSound, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setCurrentItemOrArmor, setDead, setEating, setFire, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setPosition, setPositionAndRotation, setPositionAndRotation2, setRotationYawHead, setSneaking, setSprinting, setVelocity, setWorld, shouldDismountInWater, shouldExplodeBlock, shouldRenderInPass, shouldRiderSit, toString, updateRidden, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
public int age
public int delayBeforeCanPickup
public float hoverStart
public int lifespan
public EntityItem(World par1World, double par2, double par4, double par6)
public EntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack)
public EntityItem(World par1World)
public void onUpdate()
public boolean combineItems(EntityItem par1EntityItem)
public void setAgeToCreativeDespawnTime()
public boolean handleWaterMovement()
handleWaterMovement
in class Entity
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
attackEntityFrom
in class Entity
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
onCollideWithPlayer
in class Entity
public String getEntityName()
getEntityName
in class Entity
public boolean canAttackWithItem()
canAttackWithItem
in class Entity
public void travelToDimension(int par1)
travelToDimension
in class Entity
public ItemStack getEntityItem()
public void setEntityItemStack(ItemStack par1ItemStack)