Package net.minecraft.entity.ai.goal
Class MoveThroughVillageGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.MoveThroughVillageGoal
public class MoveThroughVillageGoal extends Goal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control
-
Field Summary
Fields Modifier and Type Field Description private int
distance
private BooleanSupplier
doorPassingThroughGetter
protected PathAwareEntity
mob
private boolean
requiresNighttime
private double
speed
private BlockPos
target
private Path
targetPath
private List<BlockPos>
visitedTargets
-
Constructor Summary
Constructors Constructor Description MoveThroughVillageGoal(PathAwareEntity pathAwareEntity, double speed, boolean requiresNighttime, int distance, BooleanSupplier doorPassingThroughGetter)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
private void
forgetOldTarget()
boolean
shouldContinue()
private boolean
shouldVisit(BlockPos pos)
void
start()
void
stop()
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, tick, toString
-
Field Details
-
mob
-
speed
private final double speed -
targetPath
-
target
-
requiresNighttime
private final boolean requiresNighttime -
visitedTargets
-
distance
private final int distance -
doorPassingThroughGetter
-
-
Constructor Details
-
MoveThroughVillageGoal
public MoveThroughVillageGoal(PathAwareEntity pathAwareEntity, double speed, boolean requiresNighttime, int distance, BooleanSupplier doorPassingThroughGetter)
-
-
Method Details
-
canStart
public boolean canStart() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classGoal
-
start
public void start() -
stop
public void stop() -
shouldVisit
-
forgetOldTarget
private void forgetOldTarget()
-