Class EntityArrow

java.lang.Object
net.minecraft.src.Entity
net.minecraft.src.EntityArrow
All Implemented Interfaces:
IProjectile
Direct Known Subclasses:
BroadheadArrowEntity, InfiniteArrowEntity, RottenArrowEntity

public class EntityArrow extends Entity implements IProjectile
  • 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 canBePickedUp
      1 if the player can pick up the arrow
    • arrowShake

      public int arrowShake
      Seems to be some sort of timer for animating an arrow.
    • shootingEntity

      public Entity shootingEntity
      The owner of this arrow.
  • Constructor Details

    • EntityArrow

      public EntityArrow(World par1World)
    • EntityArrow

      public EntityArrow(World par1World, double par2, double par4, double par6)
    • EntityArrow

      public EntityArrow(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5)
    • EntityArrow

      public EntityArrow(World par1World, EntityLivingBase par2EntityLivingBase, float par3)
  • Method Details

    • entityInit

      protected void entityInit()
      Specified by:
      entityInit in class Entity
    • 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:
      setThrowableHeading in interface IProjectile
    • 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:
      setPositionAndRotation2 in class Entity
    • setVelocity

      public void setVelocity(double par1, double par3, double par5)
      Sets the velocity to the args. Args: x, y, z
      Overrides:
      setVelocity in class Entity
    • onUpdate

      public void onUpdate()
      Called to update the entity's position/logic.
      Overrides:
      onUpdate in class Entity
    • writeEntityToNBT

      public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to write subclass entity data to NBT.
      Specified by:
      writeEntityToNBT in class Entity
    • readEntityFromNBT

      public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Specified by:
      readEntityFromNBT in class Entity
    • onCollideWithPlayer

      public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
      Called by a player entity when they collide with an entity
      Overrides:
      onCollideWithPlayer in class Entity
    • 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:
      canTriggerWalking in class Entity
    • getShadowSize

      public float getShadowSize()
      Overrides:
      getShadowSize in class Entity
    • 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:
      canAttackWithItem in class Entity
    • 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

      protected boolean addArrowToPlayerInv(EntityPlayer player)
    • getCorrespondingItem

      public Item getCorrespondingItem()
    • canHopperCollect

      public boolean canHopperCollect()