Class PhantomEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Leashable, Monster, Targeter, ScoreHolder, Nameable, EntityLike

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

    • field_30475

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

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

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

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

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

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

    • PhantomEntity

      public PhantomEntity(EntityType<? extends PhantomEntity> 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
  • 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
      named isFlappingWings Lnet/minecraft/entity/Entity;isFlappingWings()Z
      intermediary method_5776 Lnet/minecraft/class_1297;method_5776()Z
      official ba Lbvj;ba()Z
    • createBodyControl

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

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

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Overrides:
      initDataTracker in class MobEntity
      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
    • setPhantomSize

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

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

      public int getPhantomSize()
      Mappings:
      Namespace Name Mixin selector
      named getPhantomSize Lnet/minecraft/entity/mob/PhantomEntity;getPhantomSize()I
      intermediary method_7084 Lnet/minecraft/class_1593;method_7084()I
      official m Lcmy;m()I
    • 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.

      Specified by:
      onTrackedDataSet in interface DataTracked
      Overrides:
      onTrackedDataSet in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named onTrackedDataSet Lnet/minecraft/entity/data/DataTracked;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
      intermediary method_5674 Lnet/minecraft/class_9221;method_5674(Lnet/minecraft/class_2940;)V
      official a Lalf;a(Lalc;)V
    • getWingFlapTickOffset

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

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

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

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

      public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable @Nullable EntityData entityData)
      Overrides:
      initialize in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      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/entity/EntityData;
      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_1315;
      official a Lbwh;a(Ldhy;Lbtg;Lbvp;Lbwy;)Lbwy;
    • 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
      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
    • 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
      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
    • 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
    • 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
      named getSoundCategory Lnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;
      intermediary method_5634 Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;
      official dn Lbvj;dn()Laxg;
    • getAmbientSound

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

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

      protected SoundEvent getDeathSound()
      Overrides:
      getDeathSound in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getDeathSound Lnet/minecraft/entity/LivingEntity;getDeathSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_6002 Lnet/minecraft/class_1309;method_6002()Lnet/minecraft/class_3414;
      official o_ Lbwf;o_()Laxe;
    • getSoundVolume

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

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

      public EntityDimensions getBaseDimensions(EntityPose pose)
      Overrides:
      getBaseDimensions in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getBaseDimensions Lnet/minecraft/entity/LivingEntity;getBaseDimensions(Lnet/minecraft/entity/EntityPose;)Lnet/minecraft/entity/EntityDimensions;
      intermediary method_55694 Lnet/minecraft/class_1309;method_55694(Lnet/minecraft/class_4050;)Lnet/minecraft/class_4048;
      official e Lbwf;e(Lbwr;)Lbvm;
    • testTargetPredicate

      boolean testTargetPredicate(ServerWorld world, LivingEntity target, TargetPredicate predicate)
      Mappings:
      Namespace Name Mixin selector
      named testTargetPredicate Lnet/minecraft/entity/mob/PhantomEntity;testTargetPredicate(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/ai/TargetPredicate;)Z
      intermediary method_64463 Lnet/minecraft/class_1593;method_64463(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_4051;)Z
      official a Lcmy;a(Lash;Lbwf;Lcgw;)Z