Class AbstractArrow

All Implemented Interfaces:
CommandSource, TraceableEntity, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, INBTSerializable<CompoundTag>
Direct Known Subclasses:
Arrow, SpectralArrow, ThrownTrident

public abstract class AbstractArrow extends Projectile
  • Field Details

    • ARROW_BASE_DAMAGE

      private static final double ARROW_BASE_DAMAGE
      See Also:
    • ID_FLAGS

      private static final EntityDataAccessor<Byte> ID_FLAGS
    • PIERCE_LEVEL

      private static final EntityDataAccessor<Byte> PIERCE_LEVEL
    • FLAG_CRIT

      private static final int FLAG_CRIT
      See Also:
    • FLAG_NOPHYSICS

      private static final int FLAG_NOPHYSICS
      See Also:
    • FLAG_CROSSBOW

      private static final int FLAG_CROSSBOW
      See Also:
    • lastState

      @Nullable private BlockState lastState
    • inGround

      protected boolean inGround
    • inGroundTime

      protected int inGroundTime
    • pickup

      public AbstractArrow.Pickup pickup
    • shakeTime

      public int shakeTime
    • life

      private int life
    • baseDamage

      private double baseDamage
    • knockback

      private int knockback
    • soundEvent

      private SoundEvent soundEvent
    • piercingIgnoreEntityIds

      @Nullable private it.unimi.dsi.fastutil.ints.IntOpenHashSet piercingIgnoreEntityIds
    • piercedAndKilledEntities

      @Nullable private List<Entity> piercedAndKilledEntities
    • ignoredEntities

      private final it.unimi.dsi.fastutil.ints.IntOpenHashSet ignoredEntities
  • Constructor Details

  • Method Details

    • setSoundEvent

      public void setSoundEvent(SoundEvent p_36741_)
    • shouldRenderAtSqrDistance

      public boolean shouldRenderAtSqrDistance(double p_36726_)
      Overrides:
      shouldRenderAtSqrDistance in class Entity
    • defineSynchedData

      protected void defineSynchedData()
      Specified by:
      defineSynchedData in class Entity
    • shoot

      public void shoot(double p_36775_, double p_36776_, double p_36777_, float p_36778_, float p_36779_)
      Overrides:
      shoot in class Projectile
    • lerpTo

      public void lerpTo(double p_36728_, double p_36729_, double p_36730_, float p_36731_, float p_36732_, int p_36733_, boolean p_36734_)
      Overrides:
      lerpTo in class Entity
    • lerpMotion

      public void lerpMotion(double p_36786_, double p_36787_, double p_36788_)
      Overrides:
      lerpMotion in class Projectile
    • tick

      public void tick()
      Overrides:
      tick in class Projectile
    • shouldFall

      private boolean shouldFall()
    • startFalling

      private void startFalling()
    • move

      public void move(MoverType p_36749_, Vec3 p_36750_)
      Overrides:
      move in class Entity
    • tickDespawn

      protected void tickDespawn()
    • resetPiercedEntities

      private void resetPiercedEntities()
    • onHitEntity

      protected void onHitEntity(EntityHitResult p_36757_)
      Overrides:
      onHitEntity in class Projectile
    • onHitBlock

      protected void onHitBlock(BlockHitResult p_36755_)
      Overrides:
      onHitBlock in class Projectile
    • getDefaultHitGroundSoundEvent

      protected SoundEvent getDefaultHitGroundSoundEvent()
    • getHitGroundSoundEvent

      protected final SoundEvent getHitGroundSoundEvent()
    • doPostHurtEffects

      protected void doPostHurtEffects(LivingEntity p_36744_)
    • findHitEntity

      @Nullable protected EntityHitResult findHitEntity(Vec3 p_36758_, Vec3 p_36759_)
    • canHitEntity

      protected boolean canHitEntity(Entity p_36743_)
      Overrides:
      canHitEntity in class Projectile
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_36772_)
      Overrides:
      addAdditionalSaveData in class Projectile
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_36761_)
      Overrides:
      readAdditionalSaveData in class Projectile
    • setOwner

      public void setOwner(@Nullable Entity p_36770_)
      Overrides:
      setOwner in class Projectile
    • playerTouch

      public void playerTouch(Player p_36766_)
      Overrides:
      playerTouch in class Entity
    • tryPickup

      protected boolean tryPickup(Player p_150121_)
    • getPickupItem

      protected abstract ItemStack getPickupItem()
    • getMovementEmission

      protected Entity.MovementEmission getMovementEmission()
      Overrides:
      getMovementEmission in class Entity
    • setBaseDamage

      public void setBaseDamage(double p_36782_)
    • getBaseDamage

      public double getBaseDamage()
    • setKnockback

      public void setKnockback(int p_36736_)
    • getKnockback

      public int getKnockback()
    • isAttackable

      public boolean isAttackable()
      Overrides:
      isAttackable in class Entity
    • getEyeHeight

      protected float getEyeHeight(Pose p_36752_, EntityDimensions p_36753_)
      Overrides:
      getEyeHeight in class Entity
    • setCritArrow

      public void setCritArrow(boolean p_36763_)
    • setPierceLevel

      public void setPierceLevel(byte p_36768_)
    • setFlag

      private void setFlag(int p_36738_, boolean p_36739_)
    • isCritArrow

      public boolean isCritArrow()
    • shotFromCrossbow

      public boolean shotFromCrossbow()
    • getPierceLevel

      public byte getPierceLevel()
    • setEnchantmentEffectsFromEntity

      public void setEnchantmentEffectsFromEntity(LivingEntity p_36746_, float p_36747_)
    • getWaterInertia

      protected float getWaterInertia()
    • setNoPhysics

      public void setNoPhysics(boolean p_36791_)
    • isNoPhysics

      public boolean isNoPhysics()
    • setShotFromCrossbow

      public void setShotFromCrossbow(boolean p_36794_)