Class AnimalBreedTask
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<AnimalEntity>
-
- net.minecraft.entity.ai.brain.task.AnimalBreedTask
-
public class AnimalBreedTask extends Task<AnimalEntity>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
-
Field Summary
Fields Modifier and Type Field Description private EntityType<? extends AnimalEntity>
partnerType
private long
spawnChildAtTime
private float
speedModifier
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description AnimalBreedTask(EntityType<? extends AnimalEntity> p_i231506_1_, float p_i231506_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canStillUse(ServerWorld p_212834_1_, AnimalEntity p_212834_2_, long p_212834_3_)
protected boolean
checkExtraStartConditions(ServerWorld p_212832_1_, AnimalEntity p_212832_2_)
private java.util.Optional<? extends AnimalEntity>
findValidBreedPartner(AnimalEntity p_233849_1_)
private AnimalEntity
getBreedTarget(AnimalEntity p_233846_1_)
private boolean
hasBreedTargetOfRightType(AnimalEntity p_233848_1_)
protected void
start(ServerWorld p_212831_1_, AnimalEntity p_212831_2_, long p_212831_3_)
protected void
stop(ServerWorld p_212835_1_, AnimalEntity p_212835_2_, long p_212835_3_)
protected void
tick(ServerWorld p_212833_1_, AnimalEntity p_212833_2_, long p_212833_3_)
-
-
-
Field Detail
-
partnerType
private final EntityType<? extends AnimalEntity> partnerType
-
speedModifier
private final float speedModifier
-
spawnChildAtTime
private long spawnChildAtTime
-
-
Constructor Detail
-
AnimalBreedTask
public AnimalBreedTask(EntityType<? extends AnimalEntity> p_i231506_1_, float p_i231506_2_)
-
-
Method Detail
-
checkExtraStartConditions
protected boolean checkExtraStartConditions(ServerWorld p_212832_1_, AnimalEntity p_212832_2_)
- Overrides:
checkExtraStartConditions
in classTask<AnimalEntity>
-
start
protected void start(ServerWorld p_212831_1_, AnimalEntity p_212831_2_, long p_212831_3_)
- Overrides:
start
in classTask<AnimalEntity>
-
canStillUse
protected boolean canStillUse(ServerWorld p_212834_1_, AnimalEntity p_212834_2_, long p_212834_3_)
- Overrides:
canStillUse
in classTask<AnimalEntity>
-
tick
protected void tick(ServerWorld p_212833_1_, AnimalEntity p_212833_2_, long p_212833_3_)
- Overrides:
tick
in classTask<AnimalEntity>
-
stop
protected void stop(ServerWorld p_212835_1_, AnimalEntity p_212835_2_, long p_212835_3_)
- Overrides:
stop
in classTask<AnimalEntity>
-
getBreedTarget
private AnimalEntity getBreedTarget(AnimalEntity p_233846_1_)
-
hasBreedTargetOfRightType
private boolean hasBreedTargetOfRightType(AnimalEntity p_233848_1_)
-
findValidBreedPartner
private java.util.Optional<? extends AnimalEntity> findValidBreedPartner(AnimalEntity p_233849_1_)
-
-