Class RandomStroll
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<PathfinderMob>
net.minecraft.world.entity.ai.behavior.RandomStroll
- Direct Known Subclasses:
RandomSwim
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate static int
private static int
protected int
protected int
private boolean
private float
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
entryCondition
-
Constructor Summary
ConstructorDescriptionRandomStroll(float p_23744_)
RandomStroll(float p_182347_, boolean p_182348_)
RandomStroll(float p_23746_, int p_23747_, int p_23748_)
RandomStroll(float p_182342_, int p_182343_, int p_182344_, boolean p_182345_)
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkExtraStartConditions(ServerLevel p_182353_, PathfinderMob p_182354_)
protected Vec3
getTargetPos(PathfinderMob p_147851_)
protected void
start(ServerLevel p_23754_, PathfinderMob p_23755_, long p_23756_)
Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
canStillUse, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
Field Details
-
MAX_XZ_DIST
private static final int MAX_XZ_DIST- See Also:
- Constant Field Values
-
MAX_Y_DIST
private static final int MAX_Y_DIST- See Also:
- Constant Field Values
-
speedModifier
private final float speedModifier -
maxHorizontalDistance
protected final int maxHorizontalDistance -
maxVerticalDistance
protected final int maxVerticalDistance -
mayStrollFromWater
private final boolean mayStrollFromWater
-
-
Constructor Details
-
RandomStroll
public RandomStroll(float p_23744_) -
RandomStroll
public RandomStroll(float p_182347_, boolean p_182348_) -
RandomStroll
public RandomStroll(float p_23746_, int p_23747_, int p_23748_) -
RandomStroll
public RandomStroll(float p_182342_, int p_182343_, int p_182344_, boolean p_182345_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<PathfinderMob>
-
start
- Overrides:
start
in classBehavior<PathfinderMob>
-
getTargetPos
-