Class SpectralArrowEntity

All Implemented Interfaces:
DataTracked, Ownable, ScoreHolder, CommandOutput, Nameable, EntityLike

public class SpectralArrowEntity extends PersistentProjectileEntity
Mappings:
Namespace Name
named net/minecraft/entity/projectile/SpectralArrowEntity
intermediary net/minecraft/class_1679
official cnw
  • Field Details

    • duration

      private int duration
      Mappings:
      Namespace Name Mixin selector
      named duration Lnet/minecraft/entity/projectile/SpectralArrowEntity;duration:I
      intermediary field_7636 Lnet/minecraft/class_1679;field_7636:I
      official f Lcnw;f:I
  • Constructor Details

    • SpectralArrowEntity

      public SpectralArrowEntity(EntityType<? extends SpectralArrowEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      official <init> Lbsv;<init>(Lbtb;Ldbz;)V
    • SpectralArrowEntity

      public SpectralArrowEntity(World world, LivingEntity owner, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/projectile/SpectralArrowEntity;<init>(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
      intermediary <init> Lnet/minecraft/class_1679;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)V
      official <init> Lcnw;<init>(Ldbz;Lbtq;Lcuq;)V
    • SpectralArrowEntity

      public SpectralArrowEntity(World world, double x, double y, double z, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/projectile/SpectralArrowEntity;<init>(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;)V
      intermediary <init> Lnet/minecraft/class_1679;<init>(Lnet/minecraft/class_1937;DDDLnet/minecraft/class_1799;)V
      official <init> Lcnw;<init>(Ldbz;DDDLcuq;)V
  • Method Details

    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class PersistentProjectileEntity
      See Also:
      API Note:
      This can be overridden to add additional logics. super.tick(); should be called in those cases.
      Implementation Note:
      By default, this delegates all logics to Entity.baseTick().
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/Entity;tick()V
      intermediary method_5773 Lnet/minecraft/class_1297;method_5773()V
      official l Lbsv;l()V
    • onHit

      protected void onHit(LivingEntity target)
      Overrides:
      onHit in class PersistentProjectileEntity
      Mappings:
      Namespace Name Mixin selector
      named onHit Lnet/minecraft/entity/projectile/PersistentProjectileEntity;onHit(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_7450 Lnet/minecraft/class_1665;method_7450(Lnet/minecraft/class_1309;)V
      official a Lcne;a(Lbtq;)V
    • readCustomDataFromNbt

      public void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      nbt might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.

      Overrides:
      readCustomDataFromNbt in class PersistentProjectileEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      official a Lbsv;a(Lus;)V
    • writeCustomDataToNbt

      public void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      Overrides:
      writeCustomDataToNbt in class PersistentProjectileEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      official b Lbsv;b(Lus;)V
    • getDefaultItemStack

      protected ItemStack getDefaultItemStack()
      Specified by:
      getDefaultItemStack in class PersistentProjectileEntity
      Mappings:
      Namespace Name Mixin selector
      named getDefaultItemStack Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getDefaultItemStack()Lnet/minecraft/item/ItemStack;
      intermediary method_57314 Lnet/minecraft/class_1665;method_57314()Lnet/minecraft/class_1799;
      official x Lcne;x()Lcuq;