Class Projectile

All Implemented Interfaces:
CommandSource, TraceableEntity, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, INBTSerializable<CompoundTag>
Direct Known Subclasses:
AbstractArrow, AbstractHurtingProjectile, FireworkRocketEntity, FishingHook, LlamaSpit, ShulkerBullet, ThrowableProjectile

public abstract class Projectile extends Entity implements TraceableEntity
  • Field Details

    • ownerUUID

      @Nullable private UUID ownerUUID
    • cachedOwner

      @Nullable private Entity cachedOwner
    • leftOwner

      private boolean leftOwner
    • hasBeenShot

      private boolean hasBeenShot
  • Constructor Details

  • Method Details

    • setOwner

      public void setOwner(@Nullable Entity p_37263_)
    • getOwner

      @Nullable public Entity getOwner()
      Specified by:
      getOwner in interface TraceableEntity
    • getEffectSource

      public Entity getEffectSource()
    • addAdditionalSaveData

      protected void addAdditionalSaveData(CompoundTag p_37265_)
      Specified by:
      addAdditionalSaveData in class Entity
    • ownedBy

      protected boolean ownedBy(Entity p_150172_)
    • readAdditionalSaveData

      protected void readAdditionalSaveData(CompoundTag p_37262_)
      Specified by:
      readAdditionalSaveData in class Entity
    • tick

      public void tick()
      Overrides:
      tick in class Entity
    • checkLeftOwner

      private boolean checkLeftOwner()
    • shoot

      public void shoot(double p_37266_, double p_37267_, double p_37268_, float p_37269_, float p_37270_)
    • shootFromRotation

      public void shootFromRotation(Entity p_37252_, float p_37253_, float p_37254_, float p_37255_, float p_37256_, float p_37257_)
    • onHit

      protected void onHit(HitResult p_37260_)
    • onHitEntity

      protected void onHitEntity(EntityHitResult p_37259_)
    • onHitBlock

      protected void onHitBlock(BlockHitResult p_37258_)
    • lerpMotion

      public void lerpMotion(double p_37279_, double p_37280_, double p_37281_)
      Overrides:
      lerpMotion in class Entity
    • canHitEntity

      protected boolean canHitEntity(Entity p_37250_)
    • updateRotation

      protected void updateRotation()
    • lerpRotation

      protected static float lerpRotation(float p_37274_, float p_37275_)
    • getAddEntityPacket

      public Packet<ClientGamePacketListener> getAddEntityPacket()
      Overrides:
      getAddEntityPacket in class Entity
    • recreateFromPacket

      public void recreateFromPacket(ClientboundAddEntityPacket p_150170_)
      Overrides:
      recreateFromPacket in class Entity
    • mayInteract

      public boolean mayInteract(Level p_150167_, BlockPos p_150168_)
      Overrides:
      mayInteract in class Entity