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 BooleanSupplier
private final int
protected final PathfinderMob
private final boolean
private Path
private BlockPos
private final double
-
Constructor Summary
ConstructorsConstructorDescriptionMoveThroughVillageGoal
(PathfinderMob pMob, double pSpeedModifier, boolean pOnlyAtNight, int pDistanceToPoi, BooleanSupplier pCanDealWithDoors) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
canUse()
private boolean
hasNotVisited
(BlockPos pPos) void
start()
void
stop()
private void
Methods inherited from class net.minecraft.world.entity.ai.goal.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 pMob, double pSpeedModifier, boolean pOnlyAtNight, int pDistanceToPoi, BooleanSupplier pCanDealWithDoors)
-
-
Method Details
-
canUse
public boolean canUse() -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUse
in classGoal
-
start
public void start() -
stop
public void stop() -
hasNotVisited
-
updateVisited
private void updateVisited()
-