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 intprivate final intprivate static final intprivate static final intprivate static final intprivate final EntityType<? extends Animal> private longprivate final floatFields 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 booleancanStillUse(ServerLevel level, Animal entity, long gameTime) protected booleancheckExtraStartConditions(ServerLevel level, Animal owner) findValidBreedPartner(Animal p_animal) private AnimalgetBreedTarget(Animal animal) private booleanhasBreedTargetOfRightType(Animal animal) protected voidstart(ServerLevel level, Animal entity, long gameTime) protected voidstop(ServerLevel level, Animal entity, long gameTime) protected voidtick(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:
checkExtraStartConditionsin classBehavior<Animal>
-
start
-
canStillUse
- Overrides:
canStillUsein classBehavior<Animal>
-
tick
-
stop
-
getBreedTarget
-
hasBreedTargetOfRightType
-
findValidBreedPartner
-