Class EnderDragonPart

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.boss.dragon.EnderDragonPart
All Implemented Interfaces:
ComponentsAccess, DataTracked, ScoreHolder, Nameable, EntityLike, UniquelyIdentifiable

public class EnderDragonPart extends Entity
Mappings:
Namespace Name
named net/minecraft/entity/boss/dragon/EnderDragonPart
intermediary net/minecraft/class_1508
official cpp
  • Field Details

    • owner

      public final EnderDragonEntity owner
      Mappings:
      Namespace Name Mixin selector
      named owner Lnet/minecraft/entity/boss/dragon/EnderDragonPart;owner:Lnet/minecraft/entity/boss/dragon/EnderDragonEntity;
      intermediary field_7007 Lnet/minecraft/class_1508;field_7007:Lnet/minecraft/class_1510;
      official a Lcpp;a:Lcps;
    • name

      public final String name
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/entity/boss/dragon/EnderDragonPart;name:Ljava/lang/String;
      intermediary field_7006 Lnet/minecraft/class_1508;field_7006:Ljava/lang/String;
      official b Lcpp;b:Ljava/lang/String;
    • partDimensions

      private final EntityDimensions partDimensions
      Mappings:
      Namespace Name Mixin selector
      named partDimensions Lnet/minecraft/entity/boss/dragon/EnderDragonPart;partDimensions:Lnet/minecraft/entity/EntityDimensions;
      intermediary field_18119 Lnet/minecraft/class_1508;field_18119:Lnet/minecraft/class_4048;
      official c Lcpp;c:Lbzp;
  • Constructor Details

    • EnderDragonPart

      public EnderDragonPart(EnderDragonEntity owner, String name, float width, float height)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/boss/dragon/EnderDragonPart;<init>(Lnet/minecraft/entity/boss/dragon/EnderDragonEntity;Ljava/lang/String;FF)V
      intermediary <init> Lnet/minecraft/class_1508;<init>(Lnet/minecraft/class_1510;Ljava/lang/String;FF)V
      official <init> Lcpp;<init>(Lcps;Ljava/lang/String;FF)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 Lbzm;a(Lall$a;)V
    • readCustomData

      protected void readCustomData(ReadView view)
      Specified by:
      readCustomData in class Entity
      Mappings:
      Namespace Name Mixin selector
      named readCustomData Lnet/minecraft/entity/Entity;readCustomData(Lnet/minecraft/storage/ReadView;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_11368;)V
      official a Lbzm;a(Lfda;)V
    • writeCustomData

      protected void writeCustomData(WriteView view)
      Specified by:
      writeCustomData in class Entity
      Mappings:
      Namespace Name Mixin selector
      named writeCustomData Lnet/minecraft/entity/Entity;writeCustomData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_11372;)V
      official a Lbzm;a(Lfdc;)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
      named canHit Lnet/minecraft/entity/Entity;canHit()Z
      intermediary method_5863 Lnet/minecraft/class_1297;method_5863()Z
      official bK Lbzm;bK()Z
    • getPickBlockStack

      @Nullable public @Nullable ItemStack getPickBlockStack()
      Returns the stack for creative "pick block" functionality, or null if there is none.

      If the entity has an item representation (such as boats or minecarts), this should be overridden to return a new stack. Note that MobEntity handles the spawn eggs. ItemFrameEntity instead returns the copy of the stack held in the frame.

      Overrides:
      getPickBlockStack in class Entity
      Returns:
      the stack for creative "pick block" functionality, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      named getPickBlockStack Lnet/minecraft/entity/Entity;getPickBlockStack()Lnet/minecraft/item/ItemStack;
      intermediary method_31480 Lnet/minecraft/class_1297;method_31480()Lnet/minecraft/class_1799;
      official dM Lbzm;dM()Ldcv;
    • damage

      public final 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 LivingEntity.isInvulnerableTo(net.minecraft.server.world.ServerWorld, net.minecraft.entity.damage.DamageSource) and return early.

      Specified by:
      damage in class Entity
      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 Lbzm;a(Laub;Lbyb;F)Z
    • isPartOf

      public boolean isPartOf(Entity entity)
      Returns whether this entity is part of entity.

      This is just an equality check for all entities except the ender dragon part. An ender dragon is composed of several entity parts; each part returns true for part.isPartOf(dragon).

      Overrides:
      isPartOf in class Entity
      Returns:
      whether this entity is part of entity
      Mappings:
      Namespace Name Mixin selector
      named isPartOf Lnet/minecraft/entity/Entity;isPartOf(Lnet/minecraft/entity/Entity;)Z
      intermediary method_5779 Lnet/minecraft/class_1297;method_5779(Lnet/minecraft/class_1297;)Z
      official v Lbzm;v(Lbzm;)Z
    • createSpawnPacket

      public Packet<ClientPlayPacketListener> createSpawnPacket(EntityTrackerEntry entityTrackerEntry)
      Returns a packet to notify the clients of the entity's spawning.
      Overrides:
      createSpawnPacket in class Entity
      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 Lbzm;a(Latz;)Lzw;
    • getDimensions

      public EntityDimensions getDimensions(EntityPose pose)
      Returns the dimensions of the entity with the given pose.
      Overrides:
      getDimensions in class Entity
      Returns:
      the dimensions of the entity with the given pose
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getDimensions Lnet/minecraft/entity/Entity;getDimensions(Lnet/minecraft/entity/EntityPose;)Lnet/minecraft/entity/EntityDimensions;
      intermediary method_18377 Lnet/minecraft/class_1297;method_18377(Lnet/minecraft/class_4050;)Lnet/minecraft/class_4048;
      official a Lbzm;a(Lcay;)Lbzp;
    • shouldSave

      public boolean shouldSave()
      Specified by:
      shouldSave in interface EntityLike
      Overrides:
      shouldSave in class Entity
      Mappings:
      Namespace Name Mixin selector
      named shouldSave Lnet/minecraft/world/entity/EntityLike;shouldSave()Z
      intermediary method_31746 Lnet/minecraft/class_5568;method_31746()Z
      official dX Leig;dX()Z