public class ForgetCompletedPointOfInterestTask extends Task<LivingEntity>
Task.Status
Modifier and Type | Field and Description |
---|---|
private Predicate<PointOfInterestType> |
condition |
private MemoryModuleType<GlobalPos> |
memoryModule |
requiredMemoryStates
Constructor and Description |
---|
ForgetCompletedPointOfInterestTask(PointOfInterestType poiType,
MemoryModuleType<GlobalPos> memoryModule) |
Modifier and Type | Method and Description |
---|---|
private boolean |
hasCompletedPointOfInterest(ServerWorld world,
BlockPos pos) |
private boolean |
isBedOccupiedByOthers(ServerWorld world,
BlockPos pos,
LivingEntity entity) |
protected void |
run(ServerWorld world,
LivingEntity entity,
long time) |
protected boolean |
shouldRun(ServerWorld world,
LivingEntity entity) |
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
private final MemoryModuleType<GlobalPos> memoryModule
private final Predicate<PointOfInterestType> condition
public ForgetCompletedPointOfInterestTask(PointOfInterestType poiType, MemoryModuleType<GlobalPos> memoryModule)
protected boolean shouldRun(ServerWorld world, LivingEntity entity)
shouldRun
in class Task<LivingEntity>
protected void run(ServerWorld world, LivingEntity entity, long time)
run
in class Task<LivingEntity>
private boolean isBedOccupiedByOthers(ServerWorld world, BlockPos pos, LivingEntity entity)
private boolean hasCompletedPointOfInterest(ServerWorld world, BlockPos pos)