Package net.minecraft.src
Class EntityArrow
java.lang.Object
net.minecraft.src.Entity
net.minecraft.src.EntityArrow
- All Implemented Interfaces:
IProjectile
- Direct Known Subclasses:
BroadheadArrowEntity,InfiniteArrowEntity,RottenArrowEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionintSeems to be some sort of timer for animating an arrow.int1 if the player can pick up the arrowprotected intprotected booleanprotected intThe owner of this arrow.protected intprotected intprotected intFields inherited from class net.minecraft.src.Entity
addedToChunk, boundingBox, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastGroundPosX, lastGroundPosY, lastGroundPosZ, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, nextBlockCheckDistance, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize -
Constructor Summary
ConstructorsConstructorDescriptionEntityArrow(World par1World) EntityArrow(World par1World, double par2, double par4, double par6) EntityArrow(World par1World, EntityLivingBase par2EntityLivingBase, float par3) EntityArrow(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddArrowToPlayerInv(EntityPlayer player) booleanIf returns false, the item will not inflict any damage against entities.booleanprotected booleanreturns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling cropsprotected voiddoubleprotected floatbooleanWhether the arrow has a stream of critical hit particles flying behind it.floatvoidonCollideWithPlayer(EntityPlayer par1EntityPlayer) Called by a player entity when they collide with an entityvoidonUpdate()Called to update the entity's position/logic.voidreadEntityFromNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to read subclass entity data from NBT.voidsetDamage(double par1) voidsetIsCritical(boolean par1) Whether the arrow has a stream of critical hit particles flying behind it.voidsetKnockbackStrength(int par1) Sets the amount of knockback the arrow applies when it hits a mob.voidsetPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) Sets the position and rotation.voidsetThrowableHeading(double par1, double par3, double par5, float par7, float par8) Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.voidsetVelocity(double par1, double par3, double par5) Sets the velocity to the args.voidwriteEntityToNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to write subclass entity data to NBT.Methods inherited from class net.minecraft.src.Entity
addComponent, addEntityCrashInfo, addToPlayerScore, addVelocity, appliesConstantForceWhenRidingBoat, applyEntityCollision, attackEntityFrom, attractsLightning, canBeCollidedWith, canBePushed, canCollideWithEntity, canEntityTriggerTripwire, canRenderOnFire, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doBlockCollisions, doesEntityApplyToSpawnCap, doesEntityApplyToSquidPossessionCap, doesEntityNotTriggerPressurePlate, doesNotDismountInWater, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, flagAllWatchedObjectsDirty, flingAwayFromEntity, getAir, getAnimalKickMovementMultiplier, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCanBeHeadCrabbed, getCollisionBorderSize, getCollisionBox, getComponent, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityName, getEntityString, getEyeHeight, getFlag, getHeadCrabSharedAttackTarget, getLastActiveItems, getLookVec, getMaxInPortalTime, getMaxSafePointTries, getMountedYOffset, getParts, getPortalCooldown, getRotationYawHead, getTeleportDirection, getTranslatedEntityName, getUniqueID, getVisualBoundingBox, getXZDistanceSqToEntity, getYOffset, handleHealthUpdate, handleLavaMovement, handleWaterMovement, hasComponent, hashCode, hasHeadCrabbedSquid, hitByEntity, initComponents, interactFirst, isAffectedByMovementModifiers, isBeingRainedOn, isBurning, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInsideOpaqueBlock, isEntityInsideSuffocatingBlock, isEntityInsideSuffocatingBlock, isEntityInvulnerable, isImmuneToFire, isImmuneToHeadCrabDamage, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isItemEntity, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSecondaryTargetForSquid, isSneaking, isSprinting, isUsingSpecialKey, isValidOngoingAttackTargetForSquid, isValidZombieSecondaryTarget, isWet, kill, mountEntity, mountEntityRemote, moveEntity, moveFlying, movementModifierWhenRidingBoat, newDoubleNBTList, newFloatNBTList, notifyOfWolfHowl, onBlockDispenserConsume, onChunkLoad, onEntityUpdate, onFlungBySquidTentacle, onHeadCrabbedBySquid, onKickedByAnimal, onKillEntity, onPossessedRidingEntityDeath, onStruckByLightning, outOfUpdateRangeUpdate, performHurtAnimation, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, readFromNBT, setAir, setAngles, setBeenAttacked, setCurrentItemOrArmor, setDead, setEating, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setRotationYawHead, setSize, setSneaking, setSprinting, setWorld, shouldExplodeBlock, shouldSetPosAfterLoading, shouldSetPositionOnLoad, toString, travelToDimension, tryToSetFireToBlocksInContact, updateCloak, updateFallState, updateRidden, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Field Details
-
xTile
protected int xTile -
yTile
protected int yTile -
zTile
protected int zTile -
inTile
protected int inTile -
inData
protected int inData -
inGround
protected boolean inGround -
canBePickedUp
public int canBePickedUp1 if the player can pick up the arrow -
arrowShake
public int arrowShakeSeems to be some sort of timer for animating an arrow. -
shootingEntity
The owner of this arrow.
-
-
Constructor Details
-
EntityArrow
-
EntityArrow
-
EntityArrow
public EntityArrow(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) -
EntityArrow
-
-
Method Details
-
entityInit
protected void entityInit()- Specified by:
entityInitin classEntity
-
setThrowableHeading
public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8) Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.- Specified by:
setThrowableHeadingin interfaceIProjectile
-
setPositionAndRotation2
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, posY, posZ, yaw, pitch- Overrides:
setPositionAndRotation2in classEntity
-
setVelocity
public void setVelocity(double par1, double par3, double par5) Sets the velocity to the args. Args: x, y, z- Overrides:
setVelocityin classEntity
-
onUpdate
public void onUpdate()Called to update the entity's position/logic. -
writeEntityToNBT
(abstract) Protected helper method to write subclass entity data to NBT.- Specified by:
writeEntityToNBTin classEntity
-
readEntityFromNBT
(abstract) Protected helper method to read subclass entity data from NBT.- Specified by:
readEntityFromNBTin classEntity
-
onCollideWithPlayer
Called by a player entity when they collide with an entity- Overrides:
onCollideWithPlayerin classEntity
-
canTriggerWalking
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- Overrides:
canTriggerWalkingin classEntity
-
getShadowSize
public float getShadowSize()- Overrides:
getShadowSizein classEntity
-
setDamage
public void setDamage(double par1) -
getDamage
public double getDamage() -
setKnockbackStrength
public void setKnockbackStrength(int par1) Sets the amount of knockback the arrow applies when it hits a mob. -
canAttackWithItem
public boolean canAttackWithItem()If returns false, the item will not inflict any damage against entities.- Overrides:
canAttackWithItemin classEntity
-
setIsCritical
public void setIsCritical(boolean par1) Whether the arrow has a stream of critical hit particles flying behind it. -
getIsCritical
public boolean getIsCritical()Whether the arrow has a stream of critical hit particles flying behind it. -
getDamageMultiplier
protected float getDamageMultiplier() -
addArrowToPlayerInv
-
getCorrespondingItem
-
canHopperCollect
public boolean canHopperCollect()
-