Class TakeJobSiteTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.TakeJobSiteTask
public class TakeJobSiteTask 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 float
speed
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description TakeJobSiteTask(float speed)
-
Method Summary
Modifier and Type Method Description private boolean
canReachJobSite(VillagerEntity villager, BlockPos pos, PointOfInterestType poiType)
private boolean
canUseJobSite(PointOfInterestType poiType, VillagerEntity villager, BlockPos pos)
private void
claimSite(ServerWorld world, VillagerEntity previousOwner, VillagerEntity newOwner, BlockPos pos, boolean jobSitePresent)
private void
forgetJobSiteAndWalkTarget(VillagerEntity villager)
protected void
run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected boolean
shouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity)
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
-
Field Details
-
speed
private final float speed
-
-
Constructor Details
-
TakeJobSiteTask
public TakeJobSiteTask(float speed)
-
-
Method Details
-
shouldRun
- Overrides:
shouldRun
in classTask<VillagerEntity>
-
run
- Overrides:
run
in classTask<VillagerEntity>
-
canUseJobSite
-
claimSite
private void claimSite(ServerWorld world, VillagerEntity previousOwner, VillagerEntity newOwner, BlockPos pos, boolean jobSitePresent) -
canReachJobSite
private boolean canReachJobSite(VillagerEntity villager, BlockPos pos, PointOfInterestType poiType) -
forgetJobSiteAndWalkTarget
-