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 int
duration
private long
lastEndEntityAge
private Optional<BlockPos>
pos
private long
startTime
Fields 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 void
addLookWalkTargets(VillagerEntity villager)
private boolean
canBoneMeal(BlockPos pos, ServerWorld world)
private Optional<BlockPos>
findBoneMealPos(ServerWorld world, VillagerEntity entity)
protected void
finishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected void
keepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected void
run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
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
-
startTime
private long startTime -
lastEndEntityAge
private long lastEndEntityAge -
duration
private int duration -
pos
-
-
Constructor Details
-
BoneMealTask
public BoneMealTask()
-
-
Method Details
-
shouldRun
- Overrides:
shouldRun
in classTask<VillagerEntity>
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunning
in classTask<VillagerEntity>
-
findBoneMealPos
-
canBoneMeal
-
run
- Overrides:
run
in classTask<VillagerEntity>
-
addLookWalkTargets
-
finishRunning
- Overrides:
finishRunning
in classTask<VillagerEntity>
-
keepRunning
- Overrides:
keepRunning
in classTask<VillagerEntity>
-