Class DefaultRandomPos
java.lang.Object
net.minecraft.world.entity.ai.util.DefaultRandomPos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static @Nullable BlockPosgenerateRandomPosTowardDirection(PathfinderMob mob, int horizontalDist, boolean restrict, BlockPos direction) static @Nullable Vec3getPos(PathfinderMob mob, int horizontalDist, int verticalDist) static @Nullable Vec3getPosAway(PathfinderMob mob, int horizontalDist, int verticalDist, Vec3 avoidPos) static @Nullable Vec3getPosTowards(PathfinderMob mob, int horizontalDist, int verticalDist, Vec3 towardsPos, double maxXzRadiansFromDir)
-
Constructor Details
-
DefaultRandomPos
public DefaultRandomPos()
-
-
Method Details
-
getPos
-
getPosTowards
public static @Nullable Vec3 getPosTowards(PathfinderMob mob, int horizontalDist, int verticalDist, Vec3 towardsPos, double maxXzRadiansFromDir) -
getPosAway
public static @Nullable Vec3 getPosAway(PathfinderMob mob, int horizontalDist, int verticalDist, Vec3 avoidPos) -
generateRandomPosTowardDirection
private static @Nullable BlockPos generateRandomPosTowardDirection(PathfinderMob mob, int horizontalDist, boolean restrict, BlockPos direction)
-