Class ExplosiveProjectileEntity

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

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

    • powerX

      public double powerX
      Mappings:
      Namespace Name Mixin selector
      official b Lbyt;b:D
      intermediary field_7601 Lnet/minecraft/class_1668;field_7601:D
      named powerX Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;powerX:D
    • powerY

      public double powerY
      Mappings:
      Namespace Name Mixin selector
      official c Lbyt;c:D
      intermediary field_7600 Lnet/minecraft/class_1668;field_7600:D
      named powerY Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;powerY:D
    • powerZ

      public double powerZ
      Mappings:
      Namespace Name Mixin selector
      official d Lbyt;d:D
      intermediary field_7599 Lnet/minecraft/class_1668;field_7599:D
      named powerZ Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;powerZ:D
  • Constructor Details

    • ExplosiveProjectileEntity

      protected ExplosiveProjectileEntity(EntityType<? extends ExplosiveProjectileEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbfh;<init>(Lbfl;Lcmi;)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
    • ExplosiveProjectileEntity

      public ExplosiveProjectileEntity(EntityType<? extends ExplosiveProjectileEntity> type, double x, double y, double z, double directionX, double directionY, double directionZ, World world)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbyt;<init>(Lbfl;DDDDDDLcmi;)V
      intermediary <init> Lnet/minecraft/class_1668;<init>(Lnet/minecraft/class_1299;DDDDDDLnet/minecraft/class_1937;)V
      named <init> Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;<init>(Lnet/minecraft/entity/EntityType;DDDDDDLnet/minecraft/world/World;)V
    • ExplosiveProjectileEntity

      public ExplosiveProjectileEntity(EntityType<? extends ExplosiveProjectileEntity> type, LivingEntity owner, double directionX, double directionY, double directionZ, World world)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbyt;<init>(Lbfl;Lbfx;DDDLcmi;)V
      intermediary <init> Lnet/minecraft/class_1668;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1309;DDDLnet/minecraft/class_1937;)V
      named <init> Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/entity/LivingEntity;DDDLnet/minecraft/world/World;)V
  • Method Details

    • initDataTracker

      protected void initDataTracker()
      Initializes data tracker.
      Specified by:
      initDataTracker in class Entity
      Mappings:
      Namespace Name Mixin selector
      official a_ Lbfh;a_()V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693()V
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker()V
    • shouldRender

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

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

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

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

      protected ParticleEffect getParticleType()
      Mappings:
      Namespace Name Mixin selector
      official j Lbyt;j()Lis;
      intermediary method_7467 Lnet/minecraft/class_1668;method_7467()Lnet/minecraft/class_2394;
      named getParticleType Lnet/minecraft/entity/projectile/ExplosiveProjectileEntity;getParticleType()Lnet/minecraft/particle/ParticleEffect;
    • getDrag

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

      public void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses has 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
      official b Lbfh;b(Lre;)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
    • readCustomDataFromNbt

      public void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses has 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
      official a Lbfh;a(Lre;)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
    • canHit

      public boolean canHit()
      Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.
      Overrides:
      canHit in class Entity
      Returns:
      whether the entity can be hit with a projectile or be targeted by the player crosshair
      Mappings:
      Namespace Name Mixin selector
      official bm Lbfh;bm()Z
      intermediary method_5863 Lnet/minecraft/class_1297;method_5863()Z
      named canHit Lnet/minecraft/entity/Entity;canHit()Z
    • getTargetingMargin

      public float getTargetingMargin()
      Returns the margin around the entity's bounding box where the entity targeting is still successful.
      Overrides:
      getTargetingMargin in class Entity
      Returns:
      the margin around the entity's bounding box where the entity targeting is still successful
      Mappings:
      Namespace Name Mixin selector
      official bB Lbfh;bB()F
      intermediary method_5871 Lnet/minecraft/class_1297;method_5871()F
      named getTargetingMargin Lnet/minecraft/entity/Entity;getTargetingMargin()F
    • damage

      public boolean damage(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 Entity.isInvulnerableTo(net.minecraft.entity.damage.DamageSource) and return early.

      Overrides:
      damage in class Entity
      Returns:
      whether the entity was actually damaged
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lbem;F)Z
      intermediary method_5643 Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;F)Z
      named damage Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z
    • getBrightnessAtEyes

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

      public Packet<ClientPlayPacketListener> createSpawnPacket()
      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
      Mappings:
      Namespace Name Mixin selector
      official S Lbfh;S()Lvb;
      intermediary method_18002 Lnet/minecraft/class_1297;method_18002()Lnet/minecraft/class_2596;
      named createSpawnPacket Lnet/minecraft/entity/Entity;createSpawnPacket()Lnet/minecraft/network/packet/Packet;
    • 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
      official a Lbfh;a(Lvf;)V
      intermediary method_31471 Lnet/minecraft/class_1297;method_31471(Lnet/minecraft/class_2604;)V
      named onSpawnPacket Lnet/minecraft/entity/Entity;onSpawnPacket(Lnet/minecraft/network/packet/s2c/play/EntitySpawnS2CPacket;)V