Class SpectralArrowEntity

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

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

    • DEFAULT_STACK

      private static final ItemStack DEFAULT_STACK
      Mappings:
      Namespace Name Mixin selector
      official f Lcgf;f:Lcmy;
      intermediary field_46972 Lnet/minecraft/class_1679;field_46972:Lnet/minecraft/class_1799;
      named DEFAULT_STACK Lnet/minecraft/entity/projectile/SpectralArrowEntity;DEFAULT_STACK:Lnet/minecraft/item/ItemStack;
    • duration

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

    • SpectralArrowEntity

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

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

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

    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class PersistentProjectileEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official l Lblv;l()V
      intermediary method_5773 Lnet/minecraft/class_1297;method_5773()V
      named tick Lnet/minecraft/entity/Entity;tick()V
    • onHit

      protected void onHit(LivingEntity target)
      Overrides:
      onHit in class PersistentProjectileEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lcfo;a(Lbml;)V
      intermediary method_7450 Lnet/minecraft/class_1665;method_7450(Lnet/minecraft/class_1309;)V
      named onHit Lnet/minecraft/entity/projectile/PersistentProjectileEntity;onHit(Lnet/minecraft/entity/LivingEntity;)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
      official a Lblv;a(Lsn;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)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
      official b Lblv;b(Lsn;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V