public class VillagerBreedTask extends Task<VillagerEntity>
Task.Status
Modifier and Type | Field and Description |
---|---|
private long |
breedEndTime |
requiredMemoryStates
Constructor and Description |
---|
VillagerBreedTask() |
Modifier and Type | Method and Description |
---|---|
private boolean |
canReachHome(VillagerEntity villager,
BlockPos pos) |
private Optional<VillagerEntity> |
createChild(ServerWorld serverWorld,
VillagerEntity villagerEntity,
VillagerEntity villagerEntity2) |
protected void |
finishRunning(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
private Optional<BlockPos> |
getReachableHome(ServerWorld world,
VillagerEntity villager) |
private void |
goHome(ServerWorld world,
VillagerEntity first,
VillagerEntity second) |
private boolean |
isReadyToBreed(VillagerEntity villager) |
protected void |
keepRunning(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
protected void |
run(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
private void |
setChildHome(ServerWorld world,
VillagerEntity child,
BlockPos pos) |
protected boolean |
shouldKeepRunning(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
protected boolean |
shouldRun(ServerWorld serverWorld,
VillagerEntity villagerEntity) |
getStatus, isTimeLimitExceeded, stop, tick, toString, tryStarting
protected boolean shouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity)
shouldRun
in class Task<VillagerEntity>
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
shouldKeepRunning
in class Task<VillagerEntity>
protected void run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
run
in class Task<VillagerEntity>
protected void keepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
keepRunning
in class Task<VillagerEntity>
private void goHome(ServerWorld world, VillagerEntity first, VillagerEntity second)
protected void finishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
finishRunning
in class Task<VillagerEntity>
private boolean isReadyToBreed(VillagerEntity villager)
private Optional<BlockPos> getReachableHome(ServerWorld world, VillagerEntity villager)
private boolean canReachHome(VillagerEntity villager, BlockPos pos)
private Optional<VillagerEntity> createChild(ServerWorld serverWorld, VillagerEntity villagerEntity, VillagerEntity villagerEntity2)
private void setChildHome(ServerWorld world, VillagerEntity child, BlockPos pos)