Class ExplosiveProjectileEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.projectile.ProjectileEntity
net.minecraft.entity.projectile.ExplosiveProjectileEntity
All Implemented Interfaces:
DataTracked, Ownable, ScoreHolder, Nameable, EntityLike
Direct Known Subclasses:
AbstractFireballEntity, AbstractWindChargeEntity, DragonFireballEntity, WitherSkullEntity

public abstract class ExplosiveProjectileEntity extends ProjectileEntity
Mappings:
Namespace Name
named net/minecraft/entity/projectile/ExplosiveProjectileEntity
intermediary net/minecraft/class_1668
official cqe
  • Field Details

    • field_51891

      public static final double field_51891
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_51891 Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;field_51891:D
      intermediary field_51891 Lnet/minecraft/class_1668;field_51891:D
      official a Lcqe;a:D
    • field_51892

      public static final double field_51892
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_51892 Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;field_51892:D
      intermediary field_51892 Lnet/minecraft/class_1668;field_51892:D
      official b Lcqe;b:D
    • accelerationPower

      public double accelerationPower
      Mappings:
      Namespace Name Mixin selector
      named accelerationPower Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;accelerationPower:D
      intermediary field_51893 Lnet/minecraft/class_1668;field_51893:D
      official c Lcqe;c:D
  • Constructor Details

    • ExplosiveProjectileEntity

      protected ExplosiveProjectileEntity(EntityType<? extends ExplosiveProjectileEntity> 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> Lbvj;<init>(Lbvq;Ldhh;)V
    • ExplosiveProjectileEntity

      protected ExplosiveProjectileEntity(EntityType<? extends ExplosiveProjectileEntity> type, double x, double y, double z, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;<init>(Lnet/minecraft/entity/EntityType;DDDLnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1668;<init>(Lnet/minecraft/class_1299;DDDLnet/minecraft/class_1937;)V
      official <init> Lcqe;<init>(Lbvq;DDDLdhh;)V
    • ExplosiveProjectileEntity

      public ExplosiveProjectileEntity(EntityType<? extends ExplosiveProjectileEntity> type, double x, double y, double z, Vec3d velocity, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;<init>(Lnet/minecraft/entity/EntityType;DDDLnet/minecraft/util/math/Vec3d;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1668;<init>(Lnet/minecraft/class_1299;DDDLnet/minecraft/class_243;Lnet/minecraft/class_1937;)V
      official <init> Lcqe;<init>(Lbvq;DDDLfbx;Ldhh;)V
    • ExplosiveProjectileEntity

      public ExplosiveProjectileEntity(EntityType<? extends ExplosiveProjectileEntity> type, LivingEntity owner, Vec3d velocity, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1668;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1309;Lnet/minecraft/class_243;Lnet/minecraft/class_1937;)V
      official <init> Lcqe;<init>(Lbvq;Lbwf;Lfbx;Ldhh;)V
  • Method Details

    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Specified by:
      initDataTracker in class Entity
      API Note:
      Subclasses should override this and add to the builder any data that needs to be tracked.
      Mappings:
      Namespace Name Mixin selector
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)V
      official a Lbvj;a(Lalg$a;)V
    • shouldRender

      public boolean shouldRender(double distance)
      Overrides:
      shouldRender in class Entity
      Mappings:
      Namespace Name Mixin selector
      named shouldRender Lnet/minecraft/entity/Entity;shouldRender(D)Z
      intermediary method_5640 Lnet/minecraft/class_1297;method_5640(D)Z
      official a Lbvj;a(D)Z
    • getRaycastShapeType

      protected RaycastContext.ShapeType getRaycastShapeType()
      Mappings:
      Namespace Name Mixin selector
      named getRaycastShapeType Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;getRaycastShapeType()Lnet/minecraft/world/RaycastContext$ShapeType;
      intermediary method_55053 Lnet/minecraft/class_1668;method_55053()Lnet/minecraft/class_3959$class_3960;
      official al_ Lcqe;al_()Ldgp$a;
    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class ProjectileEntity
      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 h Lbvj;h()V
    • applyDrag

      private void applyDrag()
      Mappings:
      Namespace Name Mixin selector
      named applyDrag Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;applyDrag()V
      intermediary method_63671 Lnet/minecraft/class_1668;method_63671()V
      official v Lcqe;v()V
    • addParticles

      private void addParticles()
      Mappings:
      Namespace Name Mixin selector
      named addParticles Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;addParticles()V
      intermediary method_63672 Lnet/minecraft/class_1668;method_63672()V
      official w Lcqe;w()V
    • damage

      public boolean damage(ServerWorld world, DamageSource source, float amount)
      Applies a damage to this entity. The exact implementation differs between subclasses.

      LivingEntity has health value, and damaging the entity decreases it. This also handles shields, extra damage to helmets for falling blocks, setting the attacker, playing hurt sound, etc.

      Some entities like ItemEntity also have health value, which the overridden method decrements. There also exist several entities, like EndCrystalEntity, where any damage discards the entity (perhaps with an explosion).

      If this is overridden, it must check the result of

      invalid reference
      #isInvulnerableTo
      and return early.
      Overrides:
      damage in class ProjectileEntity
      Returns:
      whether the entity was actually damaged
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/damage/DamageSource;F)Z
      intermediary method_64397 Lnet/minecraft/class_1297;method_64397(Lnet/minecraft/class_3218;Lnet/minecraft/class_1282;F)Z
      official a Lbvj;a(Lash;Lbtz;F)Z
    • canHit

      protected boolean canHit(Entity entity)
      Overrides:
      canHit in class ProjectileEntity
      Mappings:
      Namespace Name Mixin selector
      named canHit Lnet/minecraft/entity/projectile/ProjectileEntity;canHit(Lnet/minecraft/entity/Entity;)Z
      intermediary method_26958 Lnet/minecraft/class_1676;method_26958(Lnet/minecraft/class_1297;)Z
      official b Lcqp;b(Lbvj;)Z
    • isBurning

      protected boolean isBurning()
      Mappings:
      Namespace Name Mixin selector
      named isBurning Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;isBurning()Z
      intermediary method_7468 Lnet/minecraft/class_1668;method_7468()Z
      official m Lcqe;m()Z
    • getParticleType

      @Nullable protected @Nullable ParticleEffect getParticleType()
      Mappings:
      Namespace Name Mixin selector
      named getParticleType Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;getParticleType()Lnet/minecraft/particle/ParticleEffect;
      intermediary method_7467 Lnet/minecraft/class_1668;method_7467()Lnet/minecraft/class_2394;
      official s Lcqe;s()Llq;
    • getDrag

      protected float getDrag()
      Mappings:
      Namespace Name Mixin selector
      named getDrag Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;getDrag()F
      intermediary method_7466 Lnet/minecraft/class_1668;method_7466()F
      official t Lcqe;t()F
    • getDragInWater

      protected float getDragInWater()
      Mappings:
      Namespace Name Mixin selector
      named getDragInWater Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;getDragInWater()F
      intermediary method_55583 Lnet/minecraft/class_1668;method_55583()F
      official u Lcqe;u()F
    • 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 ProjectileEntity
      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 Lbvj;b(Lux;)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 ProjectileEntity
      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 Lbvj;a(Lux;)V
    • getBrightnessAtEyes

      public float getBrightnessAtEyes()
      Overrides:
      getBrightnessAtEyes in class Entity
      Mappings:
      Namespace Name Mixin selector
      named getBrightnessAtEyes Lnet/minecraft/entity/Entity;getBrightnessAtEyes()F
      intermediary method_5718 Lnet/minecraft/class_1297;method_5718()F
      official by Lbvj;by()F
    • createSpawnPacket

      public Packet<ClientPlayPacketListener> createSpawnPacket(EntityTrackerEntry entityTrackerEntry)
      Returns a packet to notify the clients of the entity's spawning.
      Overrides:
      createSpawnPacket in class ProjectileEntity
      Returns:
      a packet to notify the clients of the entity's spawning
      API Note:
      Subclasses should return new EntitySpawnS2CPacket(this), unless they use a custom spawning packet.
      Mappings:
      Namespace Name Mixin selector
      named createSpawnPacket Lnet/minecraft/entity/Entity;createSpawnPacket(Lnet/minecraft/server/network/EntityTrackerEntry;)Lnet/minecraft/network/packet/Packet;
      intermediary method_18002 Lnet/minecraft/class_1297;method_18002(Lnet/minecraft/class_3231;)Lnet/minecraft/class_2596;
      official a Lbvj;a(Lasf;)Laac;
    • onSpawnPacket

      public void onSpawnPacket(EntitySpawnS2CPacket packet)
      Called on the client when the entity receives a spawn packet.

      This sets the entity's position, angles, ID, and UUID. Subclasses can override this to initialize additional fields.

      Overrides:
      onSpawnPacket in class ProjectileEntity
      Mappings:
      Namespace Name Mixin selector
      named onSpawnPacket Lnet/minecraft/entity/Entity;onSpawnPacket(Lnet/minecraft/network/packet/s2c/play/EntitySpawnS2CPacket;)V
      intermediary method_31471 Lnet/minecraft/class_1297;method_31471(Lnet/minecraft/class_2604;)V
      official a Lbvj;a(Lacs;)V
    • setVelocityWithAcceleration

      private void setVelocityWithAcceleration(Vec3d velocity, double accelerationPower)
      Mappings:
      Namespace Name Mixin selector
      named setVelocityWithAcceleration Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;setVelocityWithAcceleration(Lnet/minecraft/util/math/Vec3d;D)V
      intermediary method_60499 Lnet/minecraft/class_1668;method_60499(Lnet/minecraft/class_243;D)V
      official a Lcqe;a(Lfbx;D)V
    • onDeflected

      protected void onDeflected(@Nullable @Nullable Entity deflector, boolean fromAttack)
      Overrides:
      onDeflected in class ProjectileEntity
      Mappings:
      Namespace Name Mixin selector
      named onDeflected Lnet/minecraft/entity/projectile/ProjectileEntity;onDeflected(Lnet/minecraft/entity/Entity;Z)V
      intermediary method_59525 Lnet/minecraft/class_1676;method_59525(Lnet/minecraft/class_1297;Z)V
      official b Lcqp;b(Lbvj;Z)V