Class AbstractArrowEntity

All Implemented Interfaces:
ICommandSource, INameable, ICapabilityProvider, ICapabilitySerializable<CompoundNBT>, IForgeEntity, INBTSerializable<CompoundNBT>
Direct Known Subclasses:
ArrowEntity, SpectralArrowEntity, TridentEntity

public abstract class AbstractArrowEntity extends ProjectileEntity
  • Field Details

    • ID_FLAGS

      private static final DataParameter<Byte> ID_FLAGS
    • PIERCE_LEVEL

      private static final DataParameter<Byte> PIERCE_LEVEL
    • lastState

      @Nullable private BlockState lastState
    • inGround

      protected boolean inGround
    • inGroundTime

      protected int inGroundTime
    • pickup

    • shakeTime

      public int shakeTime
    • life

      private int life
    • baseDamage

      private double baseDamage
    • knockback

      private int knockback
    • soundEvent

      private SoundEvent soundEvent
    • piercingIgnoreEntityIds

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

      private List<Entity> piercedAndKilledEntities
  • Constructor Details

  • Method Details

    • setSoundEvent

      public void setSoundEvent(SoundEvent p_213869_1_)
    • shouldRenderAtSqrDistance

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

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

      public void shoot(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
      Overrides:
      shoot in class ProjectileEntity
    • lerpTo

      public void lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
      Overrides:
      lerpTo in class Entity
    • lerpMotion

      public void lerpMotion(double p_70016_1_, double p_70016_3_, double p_70016_5_)
      Overrides:
      lerpMotion in class ProjectileEntity
    • tick

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

      private boolean shouldFall()
    • startFalling

      private void startFalling()
    • move

      public void move(MoverType p_213315_1_, Vector3d p_213315_2_)
      Overrides:
      move in class Entity
    • tickDespawn

      protected void tickDespawn()
    • resetPiercedEntities

      private void resetPiercedEntities()
    • onHitEntity

      protected void onHitEntity(EntityRayTraceResult p_213868_1_)
      Overrides:
      onHitEntity in class ProjectileEntity
    • onHitBlock

      protected void onHitBlock(BlockRayTraceResult p_230299_1_)
      Overrides:
      onHitBlock in class ProjectileEntity
    • getDefaultHitGroundSoundEvent

      protected SoundEvent getDefaultHitGroundSoundEvent()
    • getHitGroundSoundEvent

      protected final SoundEvent getHitGroundSoundEvent()
    • doPostHurtEffects

      protected void doPostHurtEffects(LivingEntity p_184548_1_)
    • findHitEntity

      @Nullable protected EntityRayTraceResult findHitEntity(Vector3d p_213866_1_, Vector3d p_213866_2_)
    • canHitEntity

      protected boolean canHitEntity(Entity p_230298_1_)
      Overrides:
      canHitEntity in class ProjectileEntity
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundNBT p_213281_1_)
      Overrides:
      addAdditionalSaveData in class ProjectileEntity
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundNBT p_70037_1_)
      Overrides:
      readAdditionalSaveData in class ProjectileEntity
    • setOwner

      public void setOwner(@Nullable Entity p_212361_1_)
      Overrides:
      setOwner in class ProjectileEntity
    • playerTouch

      public void playerTouch(PlayerEntity p_70100_1_)
      Overrides:
      playerTouch in class Entity
    • getPickupItem

      protected abstract ItemStack getPickupItem()
    • isMovementNoisy

      protected boolean isMovementNoisy()
      Overrides:
      isMovementNoisy in class Entity
    • setBaseDamage

      public void setBaseDamage(double p_70239_1_)
    • getBaseDamage

      public double getBaseDamage()
    • setKnockback

      public void setKnockback(int p_70240_1_)
    • isAttackable

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

      protected float getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
      Overrides:
      getEyeHeight in class Entity
    • setCritArrow

      public void setCritArrow(boolean p_70243_1_)
    • setPierceLevel

      public void setPierceLevel(byte p_213872_1_)
    • setFlag

      private void setFlag(int p_203049_1_, boolean p_203049_2_)
    • isCritArrow

      public boolean isCritArrow()
    • shotFromCrossbow

      public boolean shotFromCrossbow()
    • getPierceLevel

      public byte getPierceLevel()
    • setEnchantmentEffectsFromEntity

      public void setEnchantmentEffectsFromEntity(LivingEntity p_190547_1_, float p_190547_2_)
    • getWaterInertia

      protected float getWaterInertia()
    • setNoPhysics

      public void setNoPhysics(boolean p_203045_1_)
    • isNoPhysics

      public boolean isNoPhysics()
    • setShotFromCrossbow

      public void setShotFromCrossbow(boolean p_213865_1_)
    • getAddEntityPacket

      public IPacket<?> getAddEntityPacket()
      Specified by:
      getAddEntityPacket in class Entity