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 intdistanceprivate BooleanSupplierdoorPassingThroughGetterprotected PathAwareEntitymobprivate booleanrequiresNighttimeprivate doublespeedprivate BlockPostargetprivate PathtargetPathprivate 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 booleancanStart()private voidforgetOldTarget()booleanshouldContinue()private booleanshouldVisit(BlockPos pos)voidstart()voidstop()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:
shouldContinuein classGoal
-
start
public void start() -
stop
public void stop() -
shouldVisit
-
forgetOldTarget
private void forgetOldTarget()
-