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 floatspeedFields 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 booleancanReachJobSite(VillagerEntity villager, BlockPos pos, PointOfInterestType poiType)private booleancanUseJobSite(PointOfInterestType poiType, VillagerEntity villager, BlockPos pos)private voidclaimSite(ServerWorld world, VillagerEntity previousOwner, VillagerEntity newOwner, BlockPos pos, boolean jobSitePresent)private voidforgetJobSiteAndWalkTarget(VillagerEntity villager)protected voidrun(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected booleanshouldRun(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:
shouldRunin classTask<VillagerEntity>
-
run
- Overrides:
runin 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
-