Class MoveThroughVillageGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BooleanSupplierprivate final intprotected final PathfinderMobprivate final booleanprivate @Nullable Pathprivate BlockPosprivate final double -
Constructor Summary
ConstructorsConstructorDescriptionMoveThroughVillageGoal(PathfinderMob mob, double speedModifier, boolean onlyAtNight, int distanceToPoi, BooleanSupplier canDealWithDoors) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancanUse()private booleanhasNotVisited(BlockPos poi) voidstart()voidstop()private voidMethods inherited from class Goal
adjustedTickDelay, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, tick, toString
-
Field Details
-
mob
-
speedModifier
private final double speedModifier -
path
-
poiPos
-
onlyAtNight
private final boolean onlyAtNight -
visited
-
distanceToPoi
private final int distanceToPoi -
canDealWithDoors
-
-
Constructor Details
-
MoveThroughVillageGoal
public MoveThroughVillageGoal(PathfinderMob mob, double speedModifier, boolean onlyAtNight, int distanceToPoi, BooleanSupplier canDealWithDoors)
-
-
Method Details
-
canUse
-
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
start
-
stop
-
hasNotVisited
-
updateVisited
private void updateVisited()
-