net.minecraft.entity.passive

public abstract class AnimalEntity

extends PassiveEntity

All mapped superinterfaces:

Nameable, EntityLike, UniquelyIdentifiable, ScoreHolder, DataTracked, ComponentsAccess, HeldItemContext, StackReferenceGetter, DebugTrackable, EntryConvertible, Attackable, ServerWaypoint, Waypoint, Targeter, EquipmentHolder, Leashable

net.minecraft.world.entity.animal.Animal
net.minecraft.class_1429
net.minecraft.entity.passive.AnimalEntity

Field summary

Modifier and TypeField
protected static final int
PARENT_AGE_AFTER_BREEDING
field_30270
BREEDING_COOLDOWN
private static final int
DEFAULT_IN_LOVE_TIME
field_57599
DEFAULT_LOVE_TICKS
private int
inLove
field_6745
loveTicks
private LazyEntityReference<ServerPlayerEntity>
loveCause
field_6744
lovingPlayer

Constructor summary

ModifierConstructor
protected (EntityType<? extends AnimalEntity> type, World level)

Method summary

Modifier and TypeMethod
public static DefaultAttributeContainer$Builder
createAnimalAttributes()
method_61457()
createAnimalAttributes()
protected void
customServerAiStep(ServerLevel level)
method_5958(class_3218 arg0)
mobTick(ServerWorld arg0)
public void
aiStep()
method_6007()
tickMovement()
protected void
actuallyHurt(ServerLevel level, DamageSource source, float dmg)
method_6074(class_3218 arg0, class_1282 arg1, float arg2)
applyDamage(ServerWorld arg0, DamageSource arg1, float arg2)
public float
getWalkTargetValue(BlockPos pos, LevelReader level)
method_6144(class_2338 arg0, class_4538 arg1)
getPathfindingFavor(BlockPos arg0, WorldView arg1)
protected void
addAdditionalSaveData(ValueOutput output)
method_5652(class_11372 arg0)
writeCustomData(WriteView arg0)
protected void
readAdditionalSaveData(ValueInput input)
method_5749(class_11368 arg0)
readCustomData(ReadView arg0)
public static boolean
checkAnimalSpawnRules(EntityType<? extends Animal> type, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random)
method_20663(class_1299<? extends class_1429> arg0, class_1936 arg1, class_3730 arg2, class_2338 arg3, class_5819 arg4)
isValidNaturalSpawn(EntityType<? extends AnimalEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
protected static boolean
isBrightEnoughToSpawn(BlockAndLightGetter level, BlockPos pos)
method_39448(class_1920 arg0, class_2338 arg1)
isLightLevelValidForNaturalSpawn(BlockLightingView world, BlockPos pos)
public int
getAmbientSoundInterval()
method_5970()
getMinAmbientSoundDelay()
public boolean
removeWhenFarAway(double distSqr)
method_5974(double arg0)
canImmediatelyDespawn(double arg0)
protected int
getBaseExperienceReward(ServerLevel level)
method_6110(class_3218 arg0)
getExperienceToDrop(ServerWorld arg0)
public abstract boolean
isFood(ItemStack itemStack)
method_6481(class_1799 arg0)
isBreedingItem(ItemStack stack)
public ActionResult
mobInteract(Player player, InteractionHand hand)
method_5992(class_1657 arg0, class_1268 arg1)
interactMob(PlayerEntity arg0, Hand arg1)
protected void
playEatingSound()
method_61458()
playEatSound()
public boolean
canFallInLove()
method_6482()
canEat()
public void
setInLove(Player player)
method_6480(class_1657 arg0)
lovePlayer(PlayerEntity player)
public void
setInLoveTime(int time)
method_6476(int arg0)
setLoveTicks(int loveTicks)
public int
getInLoveTime()
method_29270()
getLoveTicks()
public ServerPlayerEntity
getLoveCause()
method_6478()
getLovingPlayer()
public boolean
isInLove()
method_6479()
isInLove()
public void
resetLove()
method_6477()
resetLoveTicks()
public boolean
canMate(Animal partner)
method_6474(class_1429 arg0)
canBreedWith(AnimalEntity other)
public void
spawnChildFromBreeding(ServerLevel level, Animal partner)
method_24650(class_3218 arg0, class_1429 arg1)
breed(ServerWorld world, AnimalEntity other)
public void
finalizeSpawnChildFromBreeding(ServerLevel level, Animal partner, AgeableMob offspring)
method_49794(class_3218 arg0, class_1429 arg1, class_1296 arg2)
breed(ServerWorld world, AnimalEntity other, PassiveEntity baby)
public void
handleEntityEvent(byte id)
method_5711(byte arg0)
handleStatus(byte arg0)
public Vec3d
getDismountLocationForPassenger(LivingEntity passenger)
method_24829(class_1309 arg0)
updatePassengerForDismount(LivingEntity arg0)
private void
lambda$finalizeSpawnChildFromBreeding$1(Animal arg0, AgeableMob arg1, ServerPlayer arg2)
method_49795(class_1429 arg0, class_1296 arg1, class_3222 arg2)
method_49795(AnimalEntity arg0, PassiveEntity arg1, ServerPlayerEntity player)
private static Optional
lambda$finalizeSpawnChildFromBreeding$0(Animal arg0)
method_49796(class_1429 arg0)
method_49796(AnimalEntity arg0)