Class VillagerBreedTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.VillagerBreedTask
public class VillagerBreedTask extends Task<VillagerEntity>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Fields Modifier and Type Field Description private long
breedEndTime
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description VillagerBreedTask()
-
Method Summary
Modifier and Type Method 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)
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
getStatus, isTimeLimitExceeded, stop, tick, toString, tryStarting
-
Field Details
-
breedEndTime
private long breedEndTime
-
-
Constructor Details
-
VillagerBreedTask
public VillagerBreedTask()
-
-
Method Details
-
shouldRun
- Overrides:
shouldRun
in classTask<VillagerEntity>
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunning
in classTask<VillagerEntity>
-
run
- Overrides:
run
in classTask<VillagerEntity>
-
keepRunning
- Overrides:
keepRunning
in classTask<VillagerEntity>
-
goHome
-
finishRunning
- Overrides:
finishRunning
in classTask<VillagerEntity>
-
isReadyToBreed
-
getReachableHome
-
canReachHome
-
createChild
private Optional<VillagerEntity> createChild(ServerWorld serverWorld, VillagerEntity villagerEntity, VillagerEntity villagerEntity2) -
setChildHome
-