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 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 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 body, long timestamp) protected booleancheckExtraStartConditions(ServerLevel level, Animal body) findValidBreedPartner(Animal body) private AnimalgetBreedTarget(Animal body) private booleanprotected voidstart(ServerLevel level, Animal body, long timestamp) protected voidstop(ServerLevel level, Animal body, long timestamp) protected voidtick(ServerLevel level, Animal body, long timestamp) Methods inherited from class Behavior
debugString, doStop, getRequiredMemories, 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
-