From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/RandomPos.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Minecraft.World/RandomPos.h (limited to 'Minecraft.World/RandomPos.h') diff --git a/Minecraft.World/RandomPos.h b/Minecraft.World/RandomPos.h new file mode 100644 index 00000000..eceed17e --- /dev/null +++ b/Minecraft.World/RandomPos.h @@ -0,0 +1,17 @@ +#pragma once + +class PathfinderMob; + +class RandomPos +{ +private: + static Vec3 *tempDir; + +public: + static Vec3 *getPos(shared_ptr mob, int xzDist, int yDist, int quadrant = -1); // 4J added quadrant + static Vec3 *getPosTowards(shared_ptr mob, int xzDist, int yDist, Vec3 *towardsPos); + static Vec3 *getPosAvoid(shared_ptr mob, int xzDist, int yDist, Vec3 *avoidPos); + +private: + static Vec3 *generateRandomPos(shared_ptr mob, int xzDist, int yDist, Vec3 *dir, int quadrant = -1); // 4J added quadrant +}; \ No newline at end of file -- cgit v1.2.3