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> pPartnerType) AnimalMakeLove(EntityType<? extends Animal> pPartnerType, float pSpeedModifier, int pCloseEnoughDistance) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel pLevel, Animal pEntity, long pGameTime) protected booleancheckExtraStartConditions(ServerLevel pLevel, Animal pOwner) findValidBreedPartner(Animal pAnimal) private AnimalgetBreedTarget(Animal pAnimal) private booleanhasBreedTargetOfRightType(Animal pAnimal) protected voidstart(ServerLevel pLevel, Animal pEntity, long pGameTime) protected voidstop(ServerLevel pLevel, Animal pEntity, long pGameTime) protected voidtick(ServerLevel pLevel, Animal pOwner, long pGameTime) 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> pPartnerType, float pSpeedModifier, int pCloseEnoughDistance)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<Animal>
-
start
-
canStillUse
- Overrides:
canStillUsein classBehavior<Animal>
-
tick
-
stop
-
getBreedTarget
-
hasBreedTargetOfRightType
-
findValidBreedPartner
-