public class BreedTask extends Task<AnimalEntity>
Task.Status
Modifier and Type | Field and Description |
---|---|
private long |
breedTime |
private float |
field_23129 |
private EntityType<? extends AnimalEntity> |
targetType |
requiredMemoryStates
Constructor and Description |
---|
BreedTask(EntityType<? extends AnimalEntity> targetType,
float float2) |
Modifier and Type | Method and Description |
---|---|
private Optional<? extends AnimalEntity> |
findBreedTarget(AnimalEntity animal) |
protected void |
finishRunning(ServerWorld serverWorld,
AnimalEntity animalEntity,
long long2) |
private AnimalEntity |
getBreedTarget(AnimalEntity animal) |
private boolean |
hasBreedTarget(AnimalEntity animal) |
protected void |
keepRunning(ServerWorld serverWorld,
AnimalEntity animalEntity,
long long2) |
protected void |
run(ServerWorld serverWorld,
AnimalEntity animalEntity,
long long2) |
protected boolean |
shouldKeepRunning(ServerWorld serverWorld,
AnimalEntity animalEntity,
long long2) |
protected boolean |
shouldRun(ServerWorld serverWorld,
AnimalEntity animalEntity) |
getStatus, isTimeLimitExceeded, stop, tick, toString, tryStarting
private final EntityType<? extends AnimalEntity> targetType
private final float field_23129
private long breedTime
public BreedTask(EntityType<? extends AnimalEntity> targetType, float float2)
protected boolean shouldRun(ServerWorld serverWorld, AnimalEntity animalEntity)
shouldRun
in class Task<AnimalEntity>
protected void run(ServerWorld serverWorld, AnimalEntity animalEntity, long long2)
run
in class Task<AnimalEntity>
protected boolean shouldKeepRunning(ServerWorld serverWorld, AnimalEntity animalEntity, long long2)
shouldKeepRunning
in class Task<AnimalEntity>
protected void keepRunning(ServerWorld serverWorld, AnimalEntity animalEntity, long long2)
keepRunning
in class Task<AnimalEntity>
protected void finishRunning(ServerWorld serverWorld, AnimalEntity animalEntity, long long2)
finishRunning
in class Task<AnimalEntity>
private AnimalEntity getBreedTarget(AnimalEntity animal)
private boolean hasBreedTarget(AnimalEntity animal)
private Optional<? extends AnimalEntity> findBreedTarget(AnimalEntity animal)