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> pPartnerType) AnimalMakeLove
(EntityType<? extends Animal> pPartnerType, float pSpeedModifier, int pCloseEnoughDistance) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel pLevel, Animal pEntity, long pGameTime) protected boolean
checkExtraStartConditions
(ServerLevel pLevel, Animal pOwner) findValidBreedPartner
(Animal pAnimal) private Animal
getBreedTarget
(Animal pAnimal) private boolean
hasBreedTargetOfRightType
(Animal pAnimal) protected void
start
(ServerLevel pLevel, Animal pEntity, long pGameTime) protected void
stop
(ServerLevel pLevel, Animal pEntity, long pGameTime) protected void
tick
(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:
checkExtraStartConditions
in classBehavior<Animal>
-
start
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Animal>
-
tick
-
stop
-
getBreedTarget
-
hasBreedTargetOfRightType
-
findValidBreedPartner
-