Class PassiveEntity

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

public abstract class PassiveEntity extends PathAwareEntity
Mappings:
Namespace Name
named net/minecraft/entity/passive/PassiveEntity
intermediary net/minecraft/class_1296
official bsk
  • 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 ca Lbsk;ca:Lajv;
    • 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 b Lbsk;b: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 cb Lbsk;cb: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 c Lbsk;c: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 d Lbsk;d: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 e Lbsk;e: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> Lbsq;<init>(Lbsw;Ldcu;)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 Lbtn;a(Lddj;Lbqo;Lbtp;Lbuf;)Lbuf;
    • 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 Lbsk;a(Laqt;Lbsk;)Lbsk;
    • 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 Lbsq;a(Lajz$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 X_ Lbsk;X_()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 g Lbsk;g()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 Lbsk;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_ Lbsk;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_ Lbsk;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 Lbsq;b(Lua;)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 Lbsq;a(Lua;)V
    • onTrackedDataSet

      public void onTrackedDataSet(TrackedData<?> data)
      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 Lajy;a(Lajv;)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 m_ Lbtl;m_()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 k Lbsk;k()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 o_ Lbtl;o_()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 Lbtn;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_ Lbsk;d_(I)I