Class BoneMealTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.BoneMealTask
public class BoneMealTask 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 intdurationprivate longlastEndEntityAgeprivate Optional<BlockPos>posprivate longstartTimeFields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates -
Constructor Summary
Constructors Constructor Description BoneMealTask() -
Method Summary
Modifier and Type Method Description private voidaddLookWalkTargets(VillagerEntity villager)private booleancanBoneMeal(BlockPos pos, ServerWorld world)private Optional<BlockPos>findBoneMealPos(ServerWorld world, VillagerEntity entity)protected voidfinishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected voidkeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected voidrun(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected booleanshouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected booleanshouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity)Methods inherited from class net.minecraft.entity.ai.brain.task.Task
getStatus, isTimeLimitExceeded, stop, tick, toString, tryStarting
-
Field Details
-
startTime
private long startTime -
lastEndEntityAge
private long lastEndEntityAge -
duration
private int duration -
pos
-
-
Constructor Details
-
BoneMealTask
public BoneMealTask()
-
-
Method Details
-
shouldRun
- Overrides:
shouldRunin classTask<VillagerEntity>
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunningin classTask<VillagerEntity>
-
findBoneMealPos
-
canBoneMeal
-
run
- Overrides:
runin classTask<VillagerEntity>
-
addLookWalkTargets
-
finishRunning
- Overrides:
finishRunningin classTask<VillagerEntity>
-
keepRunning
- Overrides:
keepRunningin classTask<VillagerEntity>
-