Class AnimalEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Leashable, Targeter, ScoreHolder, Nameable, EntityLike
Direct Known Subclasses:
AbstractHorseEntity, ArmadilloEntity, AxolotlEntity, BeeEntity, ChickenEntity, CowEntity, FoxEntity, FrogEntity, GoatEntity, HoglinEntity, OcelotEntity, PandaEntity, PigEntity, PolarBearEntity, RabbitEntity, SheepEntity, SnifferEntity, StriderEntity, TameableEntity, TurtleEntity

public abstract class AnimalEntity extends PassiveEntity
Mappings:
Namespace Name
named net/minecraft/entity/passive/AnimalEntity
intermediary net/minecraft/class_1429
official chw
  • Field Details

    • BREEDING_COOLDOWN

      protected static final int BREEDING_COOLDOWN
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named BREEDING_COOLDOWN Lnet/minecraft/entity/passive/AnimalEntity;BREEDING_COOLDOWN:I
      intermediary field_30270 Lnet/minecraft/class_1429;field_30270:I
      official cc Lchw;cc:I
    • loveTicks

      private int loveTicks
      Mappings:
      Namespace Name Mixin selector
      named loveTicks Lnet/minecraft/entity/passive/AnimalEntity;loveTicks:I
      intermediary field_6745 Lnet/minecraft/class_1429;field_6745:I
      official bZ Lchw;bZ:I
    • lovingPlayer

      @Nullable private @Nullable UUID lovingPlayer
      Mappings:
      Namespace Name Mixin selector
      named lovingPlayer Lnet/minecraft/entity/passive/AnimalEntity;lovingPlayer:Ljava/util/UUID;
      intermediary field_6744 Lnet/minecraft/class_1429;field_6744:Ljava/util/UUID;
      official ca Lchw;ca:Ljava/util/UUID;
  • Constructor Details

    • AnimalEntity

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

    • createAnimalAttributes

      public static DefaultAttributeContainer.Builder createAnimalAttributes()
      Mappings:
      Namespace Name Mixin selector
      named createAnimalAttributes Lnet/minecraft/entity/passive/AnimalEntity;createAnimalAttributes()Lnet/minecraft/entity/attribute/DefaultAttributeContainer$Builder;
      intermediary method_61457 Lnet/minecraft/class_1429;method_61457()Lnet/minecraft/class_5132$class_5133;
      official gt Lchw;gt()Lbxm$a;
    • mobTick

      protected void mobTick(ServerWorld world)
      Overrides:
      mobTick in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named mobTick Lnet/minecraft/entity/mob/MobEntity;mobTick(Lnet/minecraft/server/world/ServerWorld;)V
      intermediary method_5958 Lnet/minecraft/class_1308;method_5958(Lnet/minecraft/class_3218;)V
      official a Lbwh;a(Lash;)V
    • tickMovement

      public void tickMovement()
      Overrides:
      tickMovement in class PassiveEntity
      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
    • applyDamage

      protected void applyDamage(ServerWorld world, DamageSource source, float amount)
      Overrides:
      applyDamage in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named applyDamage Lnet/minecraft/entity/LivingEntity;applyDamage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/damage/DamageSource;F)V
      intermediary method_6074 Lnet/minecraft/class_1309;method_6074(Lnet/minecraft/class_3218;Lnet/minecraft/class_1282;F)V
      official b Lbwf;b(Lash;Lbtz;F)V
    • getPathfindingFavor

      public float getPathfindingFavor(BlockPos pos, WorldView world)
      Overrides:
      getPathfindingFavor in class PathAwareEntity
      Mappings:
      Namespace Name Mixin selector
      named getPathfindingFavor Lnet/minecraft/entity/mob/PathAwareEntity;getPathfindingFavor(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/WorldView;)F
      intermediary method_6144 Lnet/minecraft/class_1314;method_6144(Lnet/minecraft/class_2338;Lnet/minecraft/class_4538;)F
      official a Lbwn;a(Ljh;Ldhk;)F
    • 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 PassiveEntity
      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 PassiveEntity
      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
    • isValidNaturalSpawn

      public static boolean isValidNaturalSpawn(EntityType<? extends AnimalEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      named isValidNaturalSpawn Lnet/minecraft/entity/passive/AnimalEntity;isValidNaturalSpawn(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Z
      intermediary method_20663 Lnet/minecraft/class_1429;method_20663(Lnet/minecraft/class_1299;Lnet/minecraft/class_1936;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      official b Lchw;b(Lbvq;Ldhi;Lbvp;Ljh;Lbam;)Z
    • isLightLevelValidForNaturalSpawn

      protected static boolean isLightLevelValidForNaturalSpawn(BlockRenderView world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named isLightLevelValidForNaturalSpawn Lnet/minecraft/entity/passive/AnimalEntity;isLightLevelValidForNaturalSpawn(Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/util/math/BlockPos;)Z
      intermediary method_39448 Lnet/minecraft/class_1429;method_39448(Lnet/minecraft/class_1920;Lnet/minecraft/class_2338;)Z
      official a Lchw;a(Ldgj;Ljh;)Z
    • getMinAmbientSoundDelay

      public int getMinAmbientSoundDelay()
      Overrides:
      getMinAmbientSoundDelay in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named getMinAmbientSoundDelay Lnet/minecraft/entity/mob/MobEntity;getMinAmbientSoundDelay()I
      intermediary method_5970 Lnet/minecraft/class_1308;method_5970()I
      official Q Lbwh;Q()I
    • canImmediatelyDespawn

      public boolean canImmediatelyDespawn(double distanceSquared)
      Overrides:
      canImmediatelyDespawn in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named canImmediatelyDespawn Lnet/minecraft/entity/mob/MobEntity;canImmediatelyDespawn(D)Z
      intermediary method_5974 Lnet/minecraft/class_1308;method_5974(D)Z
      official h Lbwh;h(D)Z
    • getXpToDrop

      protected int getXpToDrop(ServerWorld world)
      Called when this entity is killed and returns the amount of experience to drop.
      Overrides:
      getXpToDrop in class MobEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getXpToDrop Lnet/minecraft/entity/LivingEntity;getXpToDrop(Lnet/minecraft/server/world/ServerWorld;)I
      intermediary method_6110 Lnet/minecraft/class_1309;method_6110(Lnet/minecraft/class_3218;)I
      official e Lbwf;e(Lash;)I
    • isBreedingItem

      public abstract boolean isBreedingItem(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named isBreedingItem Lnet/minecraft/entity/passive/AnimalEntity;isBreedingItem(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_6481 Lnet/minecraft/class_1429;method_6481(Lnet/minecraft/class_1799;)Z
      official j Lchw;j(Lcxo;)Z
    • interactMob

      public ActionResult interactMob(PlayerEntity player, Hand hand)
      Overrides:
      interactMob in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named interactMob Lnet/minecraft/entity/mob/MobEntity;interactMob(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
      intermediary method_5992 Lnet/minecraft/class_1308;method_5992(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      official b Lbwh;b(Lcpw;Lbth;)Lbti;
    • playEatSound

      protected void playEatSound()
      Mappings:
      Namespace Name Mixin selector
      named playEatSound Lnet/minecraft/entity/passive/AnimalEntity;playEatSound()V
      intermediary method_61458 Lnet/minecraft/class_1429;method_61458()V
      official gu Lchw;gu()V
    • eat

      protected void eat(PlayerEntity player, Hand hand, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named eat Lnet/minecraft/entity/passive/AnimalEntity;eat(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;)V
      intermediary method_6475 Lnet/minecraft/class_1429;method_6475(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;)V
      official a Lchw;a(Lcpw;Lbth;Lcxo;)V
    • canEat

      public boolean canEat()
      Mappings:
      Namespace Name Mixin selector
      named canEat Lnet/minecraft/entity/passive/AnimalEntity;canEat()Z
      intermediary method_6482 Lnet/minecraft/class_1429;method_6482()Z
      official gv Lchw;gv()Z
    • lovePlayer

      public void lovePlayer(@Nullable @Nullable PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named lovePlayer Lnet/minecraft/entity/passive/AnimalEntity;lovePlayer(Lnet/minecraft/entity/player/PlayerEntity;)V
      intermediary method_6480 Lnet/minecraft/class_1429;method_6480(Lnet/minecraft/class_1657;)V
      official f Lchw;f(Lcpw;)V
    • setLoveTicks

      public void setLoveTicks(int loveTicks)
      Mappings:
      Namespace Name Mixin selector
      named setLoveTicks Lnet/minecraft/entity/passive/AnimalEntity;setLoveTicks(I)V
      intermediary method_6476 Lnet/minecraft/class_1429;method_6476(I)V
      official r Lchw;r(I)V
    • getLoveTicks

      public int getLoveTicks()
      Mappings:
      Namespace Name Mixin selector
      named getLoveTicks Lnet/minecraft/entity/passive/AnimalEntity;getLoveTicks()I
      intermediary method_29270 Lnet/minecraft/class_1429;method_29270()I
      official gw Lchw;gw()I
    • getLovingPlayer

      @Nullable public @Nullable ServerPlayerEntity getLovingPlayer()
      Mappings:
      Namespace Name Mixin selector
      named getLovingPlayer Lnet/minecraft/entity/passive/AnimalEntity;getLovingPlayer()Lnet/minecraft/server/network/ServerPlayerEntity;
      intermediary method_6478 Lnet/minecraft/class_1429;method_6478()Lnet/minecraft/class_3222;
      official gx Lchw;gx()Lasi;
    • isInLove

      public boolean isInLove()
      Mappings:
      Namespace Name Mixin selector
      named isInLove Lnet/minecraft/entity/passive/AnimalEntity;isInLove()Z
      intermediary method_6479 Lnet/minecraft/class_1429;method_6479()Z
      official gy Lchw;gy()Z
    • resetLoveTicks

      public void resetLoveTicks()
      Mappings:
      Namespace Name Mixin selector
      named resetLoveTicks Lnet/minecraft/entity/passive/AnimalEntity;resetLoveTicks()V
      intermediary method_6477 Lnet/minecraft/class_1429;method_6477()V
      official gz Lchw;gz()V
    • canBreedWith

      public boolean canBreedWith(AnimalEntity other)
      Mappings:
      Namespace Name Mixin selector
      named canBreedWith Lnet/minecraft/entity/passive/AnimalEntity;canBreedWith(Lnet/minecraft/entity/passive/AnimalEntity;)Z
      intermediary method_6474 Lnet/minecraft/class_1429;method_6474(Lnet/minecraft/class_1429;)Z
      official a Lchw;a(Lchw;)Z
    • breed

      public void breed(ServerWorld world, AnimalEntity other)
      Mappings:
      Namespace Name Mixin selector
      named breed Lnet/minecraft/entity/passive/AnimalEntity;breed(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/AnimalEntity;)V
      intermediary method_24650 Lnet/minecraft/class_1429;method_24650(Lnet/minecraft/class_3218;Lnet/minecraft/class_1429;)V
      official a Lchw;a(Lash;Lchw;)V
    • breed

      public void breed(ServerWorld world, AnimalEntity other, @Nullable @Nullable PassiveEntity baby)
      Mappings:
      Namespace Name Mixin selector
      named breed Lnet/minecraft/entity/passive/AnimalEntity;breed(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/AnimalEntity;Lnet/minecraft/entity/passive/PassiveEntity;)V
      intermediary method_49794 Lnet/minecraft/class_1429;method_49794(Lnet/minecraft/class_3218;Lnet/minecraft/class_1429;Lnet/minecraft/class_1296;)V
      official a Lchw;a(Lash;Lchw;Lbva;)V
    • handleStatus

      public void handleStatus(byte status)
      Called on the client when the entity receives an entity status from the server. They are often used to spawn particles or play sounds. Subclasses can override this method to handle custom entity status.
      Overrides:
      handleStatus in class MobEntity
      See Also:
      API Note:
      To send an entity status, use World.sendEntityStatus(net.minecraft.entity.Entity, byte).
      Mappings:
      Namespace Name Mixin selector
      named handleStatus Lnet/minecraft/entity/Entity;handleStatus(B)V
      intermediary method_5711 Lnet/minecraft/class_1297;method_5711(B)V
      official b Lbvj;b(B)V