Class PassiveEntity

All Implemented Interfaces:
Attackable, Targeter, CommandOutput, Nameable, EntityLike
Direct Known Subclasses:
AnimalEntity, MerchantEntity

public abstract class PassiveEntity extends PathAwareEntity
Mappings:
Namespace Name
official bfc
intermediary net/minecraft/class_1296
named net/minecraft/entity/passive/PassiveEntity
  • Field Details

    • CHILD

      private static final TrackedData<Boolean> CHILD
      Mappings:
      Namespace Name Mixin selector
      official bS Lbfc;bS:Lacl;
      intermediary field_5949 Lnet/minecraft/class_1296;field_5949:Lnet/minecraft/class_2940;
      named CHILD Lnet/minecraft/entity/passive/PassiveEntity;CHILD:Lnet/minecraft/entity/data/TrackedData;
    • BABY_AGE

      public static final int BABY_AGE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lbfc;b:I
      intermediary field_29969 Lnet/minecraft/class_1296;field_29969:I
      named BABY_AGE Lnet/minecraft/entity/passive/PassiveEntity;BABY_AGE:I
    • HAPPY_TICKS

      private static final int HAPPY_TICKS
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official bT Lbfc;bT:I
      intermediary field_29970 Lnet/minecraft/class_1296;field_29970:I
      named HAPPY_TICKS Lnet/minecraft/entity/passive/PassiveEntity;HAPPY_TICKS:I
    • breedingAge

      protected int breedingAge
      Mappings:
      Namespace Name Mixin selector
      official c Lbfc;c:I
      intermediary field_5950 Lnet/minecraft/class_1296;field_5950:I
      named breedingAge Lnet/minecraft/entity/passive/PassiveEntity;breedingAge:I
    • forcedAge

      protected int forcedAge
      Mappings:
      Namespace Name Mixin selector
      official d Lbfc;d:I
      intermediary field_5948 Lnet/minecraft/class_1296;field_5948:I
      named forcedAge Lnet/minecraft/entity/passive/PassiveEntity;forcedAge:I
    • happyTicksRemaining

      protected int happyTicksRemaining
      Mappings:
      Namespace Name Mixin selector
      official e Lbfc;e:I
      intermediary field_5947 Lnet/minecraft/class_1296;field_5947:I
      named happyTicksRemaining Lnet/minecraft/entity/passive/PassiveEntity;happyTicksRemaining:I
  • Constructor Details

    • PassiveEntity

      protected PassiveEntity(EntityType<? extends PassiveEntity> 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
  • Method Details

    • 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 Lbfz;a(Lcmx;Lbdw;Lbgb;Lbgr;Lre;)Lbgr;
      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;
    • createChild

      @Nullable public abstract @Nullable PassiveEntity createChild(ServerWorld world, PassiveEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lbfc;a(Laip;Lbfc;)Lbfc;
      intermediary method_5613 Lnet/minecraft/class_1296;method_5613(Lnet/minecraft/class_3218;Lnet/minecraft/class_1296;)Lnet/minecraft/class_1296;
      named createChild Lnet/minecraft/entity/passive/PassiveEntity;createChild(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/PassiveEntity;)Lnet/minecraft/entity/passive/PassiveEntity;
    • initDataTracker

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

      public boolean isReadyToBreed()
      Mappings:
      Namespace Name Mixin selector
      official O_ Lbfc;O_()Z
      intermediary method_19184 Lnet/minecraft/class_1296;method_19184()Z
      named isReadyToBreed Lnet/minecraft/entity/passive/PassiveEntity;isReadyToBreed()Z
    • getBreedingAge

      public int getBreedingAge()
      Mappings:
      Namespace Name Mixin selector
      official h Lbfc;h()I
      intermediary method_5618 Lnet/minecraft/class_1296;method_5618()I
      named getBreedingAge Lnet/minecraft/entity/passive/PassiveEntity;getBreedingAge()I
    • growUp

      public void growUp(int age, boolean overGrow)
      Mappings:
      Namespace Name Mixin selector
      official a Lbfc;a(IZ)V
      intermediary method_5620 Lnet/minecraft/class_1296;method_5620(IZ)V
      named growUp Lnet/minecraft/entity/passive/PassiveEntity;growUp(IZ)V
    • growUp

      public void growUp(int age)
      Mappings:
      Namespace Name Mixin selector
      official b_ Lbfc;b_(I)V
      intermediary method_5615 Lnet/minecraft/class_1296;method_5615(I)V
      named growUp Lnet/minecraft/entity/passive/PassiveEntity;growUp(I)V
    • setBreedingAge

      public void setBreedingAge(int age)
      Mappings:
      Namespace Name Mixin selector
      official c_ Lbfc;c_(I)V
      intermediary method_5614 Lnet/minecraft/class_1296;method_5614(I)V
      named setBreedingAge Lnet/minecraft/entity/passive/PassiveEntity;setBreedingAge(I)V
    • 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 MobEntity
      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 MobEntity
      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
    • 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 Lbfh;a(Lacl;)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
    • tickMovement

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

      protected void onGrowUp()
      Mappings:
      Namespace Name Mixin selector
      official m Lbfc;m()V
      intermediary method_5619 Lnet/minecraft/class_1296;method_5619()V
      named onGrowUp Lnet/minecraft/entity/passive/PassiveEntity;onGrowUp()V
    • isBaby

      public boolean isBaby()
      Overrides:
      isBaby in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official y_ Lbfx;y_()Z
      intermediary method_6109 Lnet/minecraft/class_1309;method_6109()Z
      named isBaby Lnet/minecraft/entity/LivingEntity;isBaby()Z
    • setBaby

      public void setBaby(boolean baby)
      Overrides:
      setBaby in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lbfz;a(Z)V
      intermediary method_7217 Lnet/minecraft/class_1308;method_7217(Z)V
      named setBaby Lnet/minecraft/entity/mob/MobEntity;setBaby(Z)V
    • toGrowUpAge

      public static int toGrowUpAge(int breedingAge)
      Calculates the age to pass to growUp(int) in seconds.
      Parameters:
      breedingAge - the current, negated breeding age (in ticks)
      API Note:
      When passing the value from getBreedingAge(), make sure to negate the value; otherwise, the entity's age will decrease.
      Mappings:
      Namespace Name Mixin selector
      official d_ Lbfc;d_(I)I
      intermediary method_41321 Lnet/minecraft/class_1296;method_41321(I)I
      named toGrowUpAge Lnet/minecraft/entity/passive/PassiveEntity;toGrowUpAge(I)I