Class PhantomEntity

All Implemented Interfaces:
Attackable, Monster, Targeter, ScoreHolder, CommandOutput, Nameable, EntityLike

public class PhantomEntity extends FlyingEntity implements Monster
Mappings:
Namespace Name
official ccr
intermediary net/minecraft/class_1593
named net/minecraft/entity/mob/PhantomEntity
  • Field Details

    • field_30475

      public static final float field_30475
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lccr;b:F
      intermediary field_30475 Lnet/minecraft/class_1593;field_30475:F
      named field_30475 Lnet/minecraft/entity/mob/PhantomEntity;field_30475:F
    • WING_FLAP_TICKS

      public static final int WING_FLAP_TICKS
      Mappings:
      Namespace Name Mixin selector
      official c Lccr;c:I
      intermediary field_28641 Lnet/minecraft/class_1593;field_28641:I
      named WING_FLAP_TICKS Lnet/minecraft/entity/mob/PhantomEntity;WING_FLAP_TICKS:I
    • SIZE

      private static final TrackedData<Integer> SIZE
      Mappings:
      Namespace Name Mixin selector
      official d Lccr;d:Lagm;
      intermediary field_7313 Lnet/minecraft/class_1593;field_7313:Lnet/minecraft/class_2940;
      named SIZE Lnet/minecraft/entity/mob/PhantomEntity;SIZE:Lnet/minecraft/entity/data/TrackedData;
    • targetPosition

      Vec3d targetPosition
      Mappings:
      Namespace Name Mixin selector
      official e Lccr;e:Lelt;
      intermediary field_7314 Lnet/minecraft/class_1593;field_7314:Lnet/minecraft/class_243;
      named targetPosition Lnet/minecraft/entity/mob/PhantomEntity;targetPosition:Lnet/minecraft/util/math/Vec3d;
    • circlingCenter

      BlockPos circlingCenter
      Mappings:
      Namespace Name Mixin selector
      official bS Lccr;bS:Lhx;
      intermediary field_7312 Lnet/minecraft/class_1593;field_7312:Lnet/minecraft/class_2338;
      named circlingCenter Lnet/minecraft/entity/mob/PhantomEntity;circlingCenter:Lnet/minecraft/util/math/BlockPos;
    • movementType

      Mappings:
      Namespace Name Mixin selector
      official bT Lccr;bT:Lccr$a;
      intermediary field_7315 Lnet/minecraft/class_1593;field_7315:Lnet/minecraft/class_1593$class_1594;
      named movementType Lnet/minecraft/entity/mob/PhantomEntity;movementType:Lnet/minecraft/entity/mob/PhantomEntity$PhantomMovementType;
  • Constructor Details

    • PhantomEntity

      public PhantomEntity(EntityType<? extends PhantomEntity> 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
  • Method Details

    • isFlappingWings

      public boolean isFlappingWings()
      Returns whether the entity is flapping their wings.

      Entities flapping their wings will call Entity.addFlapEffects() inside Entity.addAirTravelEffects().

      Overrides:
      isFlappingWings in class Entity
      Returns:
      whether the entity is flapping their wings
      Mappings:
      Namespace Name Mixin selector
      official aT Lblv;aT()Z
      intermediary method_5776 Lnet/minecraft/class_1297;method_5776()Z
      named isFlappingWings Lnet/minecraft/entity/Entity;isFlappingWings()Z
    • createBodyControl

      protected BodyControl createBodyControl()
      Overrides:
      createBodyControl in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official H Lbmn;H()Lbsf;
      intermediary method_5963 Lnet/minecraft/class_1308;method_5963()Lnet/minecraft/class_1330;
      named createBodyControl Lnet/minecraft/entity/mob/MobEntity;createBodyControl()Lnet/minecraft/entity/ai/control/BodyControl;
    • initGoals

      protected void initGoals()
      Overrides:
      initGoals in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official B Lbmn;B()V
      intermediary method_5959 Lnet/minecraft/class_1308;method_5959()V
      named initGoals Lnet/minecraft/entity/mob/MobEntity;initGoals()V
    • initDataTracker

      protected void initDataTracker()
      Initializes data tracker.
      Overrides:
      initDataTracker in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official c_ Lblv;c_()V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693()V
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker()V
    • setPhantomSize

      public void setPhantomSize(int size)
      Mappings:
      Namespace Name Mixin selector
      official b Lccr;b(I)V
      intermediary method_7091 Lnet/minecraft/class_1593;method_7091(I)V
      named setPhantomSize Lnet/minecraft/entity/mob/PhantomEntity;setPhantomSize(I)V
    • onSizeChanged

      private void onSizeChanged()
      Mappings:
      Namespace Name Mixin selector
      official A Lccr;A()V
      intermediary method_7097 Lnet/minecraft/class_1593;method_7097()V
      named onSizeChanged Lnet/minecraft/entity/mob/PhantomEntity;onSizeChanged()V
    • getPhantomSize

      public int getPhantomSize()
      Mappings:
      Namespace Name Mixin selector
      official u Lccr;u()I
      intermediary method_7084 Lnet/minecraft/class_1593;method_7084()I
      named getPhantomSize Lnet/minecraft/entity/mob/PhantomEntity;getPhantomSize()I
    • getActiveEyeHeight

      protected float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions)
      Overrides:
      getActiveEyeHeight in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official b Lbml;b(Lbmx;Lblw;)F
      intermediary method_18394 Lnet/minecraft/class_1309;method_18394(Lnet/minecraft/class_4050;Lnet/minecraft/class_4048;)F
      named getActiveEyeHeight Lnet/minecraft/entity/LivingEntity;getActiveEyeHeight(Lnet/minecraft/entity/EntityPose;Lnet/minecraft/entity/EntityDimensions;)F
    • onTrackedDataSet

      public void onTrackedDataSet(TrackedData<?> data)
      Called on the client when the tracked data is set.

      This can be overridden to refresh other fields when the tracked data is set or changed.

      Overrides:
      onTrackedDataSet in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lblv;a(Lagm;)V
      intermediary method_5674 Lnet/minecraft/class_1297;method_5674(Lnet/minecraft/class_2940;)V
      named onTrackedDataSet Lnet/minecraft/entity/Entity;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
    • getWingFlapTickOffset

      public int getWingFlapTickOffset()
      Mappings:
      Namespace Name Mixin selector
      official w Lccr;w()I
      intermediary method_33588 Lnet/minecraft/class_1593;method_33588()I
      named getWingFlapTickOffset Lnet/minecraft/entity/mob/PhantomEntity;getWingFlapTickOffset()I
    • isDisallowedInPeaceful

      protected boolean isDisallowedInPeaceful()
      Overrides:
      isDisallowedInPeaceful in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official X Lbmn;X()Z
      intermediary method_23734 Lnet/minecraft/class_1308;method_23734()Z
      named isDisallowedInPeaceful Lnet/minecraft/entity/mob/MobEntity;isDisallowedInPeaceful()Z
    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class MobEntity
      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
    • tickMovement

      public void tickMovement()
      Overrides:
      tickMovement in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official d_ Lbml;d_()V
      intermediary method_6007 Lnet/minecraft/class_1309;method_6007()V
      named tickMovement Lnet/minecraft/entity/LivingEntity;tickMovement()V
    • mobTick

      protected void mobTick()
      Overrides:
      mobTick in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official Z Lbmn;Z()V
      intermediary method_5958 Lnet/minecraft/class_1308;method_5958()V
      named mobTick Lnet/minecraft/entity/mob/MobEntity;mobTick()V
    • initialize

      public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable @Nullable EntityData entityData, @Nullable @Nullable NbtCompound entityNbt)
      Overrides:
      initialize in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lbmn;a(Lcue;Lbjz;Lbmp;Lbne;Lsn;)Lbne;
      intermediary method_5943 Lnet/minecraft/class_1308;method_5943(Lnet/minecraft/class_5425;Lnet/minecraft/class_1266;Lnet/minecraft/class_3730;Lnet/minecraft/class_1315;Lnet/minecraft/class_2487;)Lnet/minecraft/class_1315;
      named initialize Lnet/minecraft/entity/mob/MobEntity;initialize(Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/world/LocalDifficulty;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/entity/EntityData;Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/entity/EntityData;
    • 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 MobEntity
      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 MobEntity
      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
    • shouldRender

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

      public SoundCategory getSoundCategory()
      Returns the sound category for sounds from this entity.

      This is used by Entity.playSound(SoundEvent, float, float) and defaults to SoundCategory.NEUTRAL. Hostile entities should override this to return SoundCategory.HOSTILE.

      Overrides:
      getSoundCategory in class Entity
      Returns:
      the sound category for sounds from this entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official db Lblv;db()Lart;
      intermediary method_5634 Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;
      named getSoundCategory Lnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;
    • getAmbientSound

      protected SoundEvent getAmbientSound()
      Overrides:
      getAmbientSound in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official y Lbmn;y()Larr;
      intermediary method_5994 Lnet/minecraft/class_1308;method_5994()Lnet/minecraft/class_3414;
      named getAmbientSound Lnet/minecraft/entity/mob/MobEntity;getAmbientSound()Lnet/minecraft/sound/SoundEvent;
    • getHurtSound

      protected SoundEvent getHurtSound(DamageSource source)
      Overrides:
      getHurtSound in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official d Lbml;d(Lbkt;)Larr;
      intermediary method_6011 Lnet/minecraft/class_1309;method_6011(Lnet/minecraft/class_1282;)Lnet/minecraft/class_3414;
      named getHurtSound Lnet/minecraft/entity/LivingEntity;getHurtSound(Lnet/minecraft/entity/damage/DamageSource;)Lnet/minecraft/sound/SoundEvent;
    • getDeathSound

      protected SoundEvent getDeathSound()
      Overrides:
      getDeathSound in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official n_ Lbml;n_()Larr;
      intermediary method_6002 Lnet/minecraft/class_1309;method_6002()Lnet/minecraft/class_3414;
      named getDeathSound Lnet/minecraft/entity/LivingEntity;getDeathSound()Lnet/minecraft/sound/SoundEvent;
    • getGroup

      public EntityGroup getGroup()
      Overrides:
      getGroup in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official eS Lbml;eS()Lbmq;
      intermediary method_6046 Lnet/minecraft/class_1309;method_6046()Lnet/minecraft/class_1310;
      named getGroup Lnet/minecraft/entity/LivingEntity;getGroup()Lnet/minecraft/entity/EntityGroup;
    • getSoundVolume

      protected float getSoundVolume()
      Overrides:
      getSoundVolume in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official eW Lbml;eW()F
      intermediary method_6107 Lnet/minecraft/class_1309;method_6107()F
      named getSoundVolume Lnet/minecraft/entity/LivingEntity;getSoundVolume()F
    • canTarget

      public boolean canTarget(EntityType<?> type)
      Overrides:
      canTarget in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lbml;a(Lblz;)Z
      intermediary method_5973 Lnet/minecraft/class_1309;method_5973(Lnet/minecraft/class_1299;)Z
      named canTarget Lnet/minecraft/entity/LivingEntity;canTarget(Lnet/minecraft/entity/EntityType;)Z
    • getDimensions

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

      protected Vector3f getPassengerAttachmentPos(Entity passenger, EntityDimensions dimensions, float scaleFactor)
      Overrides:
      getPassengerAttachmentPos in class Entity
      Mappings:
      Namespace Name Mixin selector
      official a Lblv;a(Lblv;Lblw;F)Lorg/joml/Vector3f;
      intermediary method_52533 Lnet/minecraft/class_1297;method_52533(Lnet/minecraft/class_1297;Lnet/minecraft/class_4048;F)Lorg/joml/Vector3f;
      named getPassengerAttachmentPos Lnet/minecraft/entity/Entity;getPassengerAttachmentPos(Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/EntityDimensions;F)Lorg/joml/Vector3f;
    • getUnscaledRidingOffset

      protected float getUnscaledRidingOffset(Entity vehicle)
      Overrides:
      getUnscaledRidingOffset in class Entity
      Mappings:
      Namespace Name Mixin selector
      official l Lblv;l(Lblv;)F
      intermediary method_52537 Lnet/minecraft/class_1297;method_52537(Lnet/minecraft/class_1297;)F
      named getUnscaledRidingOffset Lnet/minecraft/entity/Entity;getUnscaledRidingOffset(Lnet/minecraft/entity/Entity;)F