mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-06 05:54:01 +00:00
22 lines
826 B
C++
22 lines
826 B
C++
#pragma once
|
|
|
|
#include <optional>
|
|
class PathfinderMob;
|
|
|
|
class RandomPos {
|
|
private:
|
|
static Vec3* tempDir;
|
|
|
|
public:
|
|
static std::optional<Vec3> getPos(std::shared_ptr<PathfinderMob> mob, int xzDist,
|
|
int yDist, int quadrant = -1); // 4J added quadrant
|
|
static std::optional<Vec3> getPosTowards(std::shared_ptr<PathfinderMob> mob, int xzDist,
|
|
int yDist, Vec3* towardsPos);
|
|
static std::optional<Vec3> getPosAvoid(std::shared_ptr<PathfinderMob> mob, int xzDist,
|
|
int yDist, Vec3* avoidPos);
|
|
private:
|
|
static std::optional<Vec3> generateRandomPos(std::shared_ptr<PathfinderMob> mob,
|
|
int xzDist, int yDist, Vec3* dir,
|
|
int quadrant = -1); // 4J added quadrant
|
|
};
|