public class EntityItem extends Entity
Modifier and Type | Field and Description |
---|---|
float |
hoverStart
The EntityItem's random initial float height.
|
int |
lifespan
The maximum age of this EntityItem.
|
addedToChunk, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
Constructor and Description |
---|
EntityItem(World worldIn) |
EntityItem(World worldIn,
double x,
double y,
double z) |
EntityItem(World worldIn,
double x,
double y,
double z,
ItemStack stack) |
Modifier and Type | Method and Description |
---|---|
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
canAttackWithItem()
If returns false, the item will not inflict any damage against entities.
|
boolean |
cannotPickup() |
protected boolean |
canTriggerWalking()
returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
prevent them from trampling crops
|
protected void |
dealFireDamage(int amount)
Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage.
|
protected void |
entityInit() |
void |
func_174870_v() |
int |
getAge() |
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)
|
java.lang.String |
getName()
Get the name of this object.
|
java.lang.String |
getOwner() |
java.lang.String |
getThrower() |
boolean |
handleWaterMovement()
Returns if this entity is in water and will end up adding the waters velocity to the entity
|
void |
onCollideWithPlayer(EntityPlayer entityIn)
Called by a player entity when they collide with an entity
|
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
readEntityFromNBT(NBTTagCompound tagCompund)
(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 |
setDefaultPickupDelay() |
void |
setEntityItemStack(ItemStack stack)
Sets the ItemStack for this entity
|
void |
setInfinitePickupDelay() |
void |
setNoDespawn() |
void |
setNoPickupDelay() |
void |
setOwner(java.lang.String owner) |
void |
setPickupDelay(int ticks) |
void |
setThrower(java.lang.String thrower) |
void |
travelToDimension(int dimensionId)
Teleports the entity to another dimension.
|
void |
writeEntityToNBT(NBTTagCompound tagCompound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, canBeCollidedWith, canBePushed, canCommandSenderUseCommand, canRenderOnFire, canRiderInteract, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, func_174817_o, func_181012_aH, func_181013_g, func_181014_aG, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getBrightness, getBrightnessForRender, getCapability, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getExtendedProperties, getEyeHeight, getFlag, getHorizontalFacing, getHoverEvent, getInventory, getLook, getLookVec, getMaxFallHeight, getMaxInPortalTime, getMountedYOffset, getNBTTagCompound, getParts, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getRotationYawHead, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, hasCapability, hasCustomName, hashCode, hitByEntity, interactAt, interactFirst, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, kill, mountEntity, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onDataWatcherUpdate, onEntityUpdate, onKillCommand, onKillEntity, onStruckByLightning, performHurtAnimation, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerExtendedProperties, replaceItemInInventory, resetEntityId, resetHeight, sendCommandFeedback, serializeNBT, setAir, setAlwaysRenderNameTag, setAngles, setBeenAttacked, setCommandStat, setCurrentItemOrArmor, setCustomNameTag, setDead, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndRotation2, setPositionAndUpdate, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, toString, updateFallState, updateRidden, updateRiderPosition, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptional
public float hoverStart
public int lifespan
public EntityItem(World worldIn, double x, double y, double z)
public EntityItem(World worldIn)
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
protected void entityInit()
entityInit
in class Entity
public void onUpdate()
public void setAgeToCreativeDespawnTime()
public boolean handleWaterMovement()
handleWaterMovement
in class Entity
protected void dealFireDamage(int amount)
dealFireDamage
in class Entity
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class Entity
public void writeEntityToNBT(NBTTagCompound tagCompound)
writeEntityToNBT
in class Entity
public void readEntityFromNBT(NBTTagCompound tagCompund)
readEntityFromNBT
in class Entity
public void onCollideWithPlayer(EntityPlayer entityIn)
onCollideWithPlayer
in class Entity
public java.lang.String getName()
getName
in interface ICommandSender
getName
in class Entity
public boolean canAttackWithItem()
canAttackWithItem
in class Entity
public void travelToDimension(int dimensionId)
travelToDimension
in class Entity
public ItemStack getEntityItem()
public void setEntityItemStack(ItemStack stack)
public java.lang.String getOwner()
public void setOwner(java.lang.String owner)
public java.lang.String getThrower()
public void setThrower(java.lang.String thrower)
public int getAge()
public void setDefaultPickupDelay()
public void setNoPickupDelay()
public void setInfinitePickupDelay()
public void setPickupDelay(int ticks)
public boolean cannotPickup()
public void setNoDespawn()
public void func_174870_v()