Package net.minecraft.entity.ai.goal
Class AnimalMateGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.AnimalMateGoal
- Direct Known Subclasses:
FoxEntity.MateGoal
,PandaEntity.PandaMateGoal
,TurtleEntity.MateGoal
public class AnimalMateGoal extends Goal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control
-
Field Summary
Fields Modifier and Type Field Description protected AnimalEntity
animal
private double
chance
private Class<? extends AnimalEntity>
entityClass
protected AnimalEntity
mate
private int
timer
private static TargetPredicate
VALID_MATE_PREDICATE
protected World
world
-
Constructor Summary
Constructors Constructor Description AnimalMateGoal(AnimalEntity animal, double chance)
AnimalMateGoal(AnimalEntity animal, double chance, Class<? extends AnimalEntity> entityClass)
-
Method Summary
Modifier and Type Method Description protected void
breed()
boolean
canStart()
private AnimalEntity
findMate()
boolean
shouldContinue()
void
stop()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, start, toString
-
Field Details
-
VALID_MATE_PREDICATE
-
animal
-
entityClass
-
world
-
mate
-
timer
private int timer -
chance
private final double chance
-
-
Constructor Details
-
AnimalMateGoal
-
AnimalMateGoal
public AnimalMateGoal(AnimalEntity animal, double chance, Class<? extends AnimalEntity> entityClass)
-
-
Method Details
-
canStart
public boolean canStart() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classGoal
-
stop
public void stop() -
tick
public void tick() -
findMate
-
breed
protected void breed()
-