Class AnimalMakeLove
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Animal>
net.minecraft.world.entity.ai.behavior.AnimalMakeLove
- All Implemented Interfaces:
BehaviorControl<Animal>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final int
private static final int
private static final int
private static final int
private final EntityType
<? extends Animal> private long
private final float
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorsConstructorDescriptionAnimalMakeLove
(EntityType<? extends Animal> partnerType) AnimalMakeLove
(EntityType<? extends Animal> partnerType, float speedModifier, int closeEnoughDistance) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel level, Animal entity, long gameTime) protected boolean
checkExtraStartConditions
(ServerLevel level, Animal owner) findValidBreedPartner
(Animal p_animal) private Animal
getBreedTarget
(Animal animal) private boolean
hasBreedTargetOfRightType
(Animal animal) protected void
start
(ServerLevel level, Animal entity, long gameTime) protected void
stop
(ServerLevel level, Animal entity, long gameTime) protected void
tick
(ServerLevel level, Animal owner, long gameTime) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
BREED_RANGE
private static final int BREED_RANGE- See Also:
-
MIN_DURATION
private static final int MIN_DURATION- See Also:
-
MAX_DURATION
private static final int MAX_DURATION- See Also:
-
partnerType
-
speedModifier
private final float speedModifier -
closeEnoughDistance
private final int closeEnoughDistance -
DEFAULT_CLOSE_ENOUGH_DISTANCE
private static final int DEFAULT_CLOSE_ENOUGH_DISTANCE- See Also:
-
spawnChildAtTime
private long spawnChildAtTime
-
-
Constructor Details
-
AnimalMakeLove
-
AnimalMakeLove
public AnimalMakeLove(EntityType<? extends Animal> partnerType, float speedModifier, int closeEnoughDistance)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<Animal>
-
start
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Animal>
-
tick
-
stop
-
getBreedTarget
-
hasBreedTargetOfRightType
-
findValidBreedPartner
-