Class AgeableMob

All Implemented Interfaces:
CommandSource, Attackable, Targeting, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, IForgeLivingEntity, INBTSerializable<CompoundTag>
Direct Known Subclasses:
AbstractVillager, Animal

public abstract class AgeableMob extends PathfinderMob
  • Field Details

    • DATA_BABY_ID

      private static final EntityDataAccessor<Boolean> DATA_BABY_ID
    • BABY_START_AGE

      public static final int BABY_START_AGE
      See Also:
    • FORCED_AGE_PARTICLE_TICKS

      private static final int FORCED_AGE_PARTICLE_TICKS
      See Also:
    • age

      protected int age
    • forcedAge

      protected int forcedAge
    • forcedAgeTimer

      protected int forcedAgeTimer
  • Constructor Details

  • Method Details

    • finalizeSpawn

      public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_146746_, DifficultyInstance p_146747_, MobSpawnType p_146748_, @Nullable SpawnGroupData p_146749_, @Nullable CompoundTag p_146750_)
      Description copied from class: Mob
      Forge: Override-Only, call via ForgeEventFactory.onFinalizeSpawn.
      Overrides are allowed. Do not wrap super calls within override (as that will cause stack overflows).
      Vanilla calls are replaced with a transformer, and are not visible in source.

      Be certain to either call super.finalizeSpawn or set the Mob.spawnType field from within your override.

      Overrides:
      finalizeSpawn in class Mob
    • getBreedOffspring

      @Nullable public abstract AgeableMob getBreedOffspring(ServerLevel p_146743_, AgeableMob p_146744_)
    • defineSynchedData

      protected void defineSynchedData()
      Overrides:
      defineSynchedData in class Mob
    • canBreed

      public boolean canBreed()
    • getAge

      public int getAge()
    • ageUp

      public void ageUp(int p_146741_, boolean p_146742_)
    • ageUp

      public void ageUp(int p_146759_)
    • setAge

      public void setAge(int p_146763_)
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_146761_)
      Overrides:
      addAdditionalSaveData in class Mob
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_146752_)
      Overrides:
      readAdditionalSaveData in class Mob
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(EntityDataAccessor<?> p_146754_)
      Overrides:
      onSyncedDataUpdated in class LivingEntity
    • aiStep

      public void aiStep()
      Overrides:
      aiStep in class Mob
    • ageBoundaryReached

      protected void ageBoundaryReached()
    • isBaby

      public boolean isBaby()
      Overrides:
      isBaby in class LivingEntity
    • setBaby

      public void setBaby(boolean p_146756_)
      Overrides:
      setBaby in class Mob
    • getSpeedUpSecondsWhenFeeding

      public static int getSpeedUpSecondsWhenFeeding(int p_216968_)