Class PassiveEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Leashable, Targeter, ScoreHolder, Nameable, EntityLike
Direct Known Subclasses:
AnimalEntity, MerchantEntity, WaterAnimalEntity

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

    • CHILD

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

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

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

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

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

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

    • PassiveEntity

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

    • 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;
    • createChild

      @Nullable public abstract @Nullable PassiveEntity createChild(ServerWorld world, PassiveEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named createChild Lnet/minecraft/entity/passive/PassiveEntity;createChild(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/PassiveEntity;)Lnet/minecraft/entity/passive/PassiveEntity;
      intermediary method_5613 Lnet/minecraft/class_1296;method_5613(Lnet/minecraft/class_3218;Lnet/minecraft/class_1296;)Lnet/minecraft/class_1296;
      official a Lbva;a(Lash;Lbva;)Lbva;
    • 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
    • isReadyToBreed

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

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

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

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

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

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

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

      public void setBaby(boolean baby)
      Overrides:
      setBaby in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named setBaby Lnet/minecraft/entity/mob/MobEntity;setBaby(Z)V
      intermediary method_7217 Lnet/minecraft/class_1308;method_7217(Z)V
      official a Lbwh;a(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
      named toGrowUpAge Lnet/minecraft/entity/passive/PassiveEntity;toGrowUpAge(I)I
      intermediary method_41321 Lnet/minecraft/class_1296;method_41321(I)I
      official d_ Lbva;d_(I)I
    • getForcedAge

      public int getForcedAge()
      Mappings:
      Namespace Name Mixin selector
      named getForcedAge Lnet/minecraft/entity/passive/PassiveEntity;getForcedAge()I
      intermediary method_63605 Lnet/minecraft/class_1296;method_63605()I
      official l Lbva;l()I
    • getHappyTicksRemaining

      public int getHappyTicksRemaining()
      Mappings:
      Namespace Name Mixin selector
      named getHappyTicksRemaining Lnet/minecraft/entity/passive/PassiveEntity;getHappyTicksRemaining()I
      intermediary method_63606 Lnet/minecraft/class_1296;method_63606()I
      official m Lbva;m()I