LeviLamina
Loading...
Searching...
No Matches
RandomPos.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/actor/ai/util/SolidityCheckType.h"
7
8// auto generated forward declare list
9// clang-format off
10class BlockPos;
11class BlockSource;
12class Mob;
13class Random;
14class Randomize;
15class Vec3;
16struct IntRange;
17// clang-format on
18
19class RandomPos {
20public:
21 // static functions
22 // NOLINTBEGIN
23 MCNAPI static ::std::optional<::Vec3> generateRandomPos(
24 ::Mob& mob,
25 int xzDist,
26 int yDist,
27 ::Vec3 const* dir,
28 bool canFly,
29 bool canSwim,
30 int tries,
31 ::SolidityCheckType blockTest
32 );
33
34 MCNAPI static ::std::optional<::Vec3> generateRandomPos(
35 ::Randomize& randomize,
36 ::Mob& mob,
37 int xzDist,
38 int yDist,
39 int yOffset,
40 ::Vec3 const* dir,
41 bool canFly,
42 bool canSwim,
43 ::IntRange const& hoverHeight,
44 int tries,
45 ::SolidityCheckType blockTest
46 );
47
48 MCNAPI static ::std::optional<::Vec3> generateRandomSpawnPos(
49 ::BlockSource& region,
50 ::Random& random,
51 ::Vec3 const& inPos,
52 int numAttempts,
53 int xzDist,
54 int yDist,
55 ::Vec3* dir
56 );
57
58 MCNAPI static ::std::optional<::Vec3>
59 getPos(::Mob& mob, int xzDist, int yDist, int tries, ::SolidityCheckType blockTest);
60
61 MCNAPI static ::std::optional<::Vec3>
62 getPosAvoid(::Mob& mob, int xzDist, int yDist, ::Vec3 const& avoidPos, ::SolidityCheckType blockTest, int tries);
63
64 MCNAPI static ::std::optional<::Vec3> getPosInDirection(
65 ::Mob& mob,
66 int xzDist,
67 int yDist,
68 int yOffset,
69 bool canFly,
70 bool canSwim,
71 ::Vec3* direction,
72 ::IntRange const& hoverHeight,
73 int tries,
74 ::SolidityCheckType blockTest
75 );
76
77 MCNAPI static ::std::optional<::Vec3> getPosTowards(::Mob& mob, int xzDist, int yDist, ::Vec3 const& towardsPos);
78
79 MCNAPI static ::std::optional<::Vec3>
80 getPosTowards(::Random& random, ::Mob& mob, int xzDist, int yDist, ::Vec3 const& towardsPos);
81
82 MCNAPI static bool snapToGround(
83 ::BlockPos& inOutPos,
84 ::Mob& mob,
85 int yDist,
86 ::IntRange const& hoverHeight,
87 ::SolidityCheckType blockTest
88 );
89
90 MCNAPI static bool spawnSnapToGround(::BlockSource& region, ::BlockPos& inOutPos, float startingY, int yDist);
91 // NOLINTEND
92};
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Mob.h:47
Definition RandomPos.h:19
static MCAPI ::std::optional<::Vec3 > generateRandomPos(::Mob &mob, int xzDist, int yDist, ::Vec3 const *dir, bool canFly, bool canSwim, int tries, ::SolidityCheckType blockTest)
static MCAPI bool snapToGround(::BlockPos &inOutPos, ::Mob &mob, int yDist, ::IntRange const &hoverHeight, ::SolidityCheckType blockTest)
static MCAPI ::std::optional<::Vec3 > getPosInDirection(::Mob &mob, int xzDist, int yDist, int yOffset, bool canFly, bool canSwim, ::Vec3 *direction, ::IntRange const &hoverHeight, int tries, ::SolidityCheckType blockTest)
static MCAPI ::std::optional<::Vec3 > getPosTowards(::Random &random, ::Mob &mob, int xzDist, int yDist, ::Vec3 const &towardsPos)
static MCAPI ::std::optional<::Vec3 > getPosAvoid(::Mob &mob, int xzDist, int yDist, ::Vec3 const &avoidPos, ::SolidityCheckType blockTest, int tries)
static MCAPI ::std::optional<::Vec3 > getPos(::Mob &mob, int xzDist, int yDist, int tries, ::SolidityCheckType blockTest)
static MCAPI bool spawnSnapToGround(::BlockSource &region, ::BlockPos &inOutPos, float startingY, int yDist)
static MCAPI ::std::optional<::Vec3 > generateRandomPos(::Randomize &randomize, ::Mob &mob, int xzDist, int yDist, int yOffset, ::Vec3 const *dir, bool canFly, bool canSwim, ::IntRange const &hoverHeight, int tries, ::SolidityCheckType blockTest)
static MCAPI ::std::optional<::Vec3 > generateRandomSpawnPos(::BlockSource &region, ::Random &random, ::Vec3 const &inPos, int numAttempts, int xzDist, int yDist, ::Vec3 *dir)
static MCAPI ::std::optional<::Vec3 > getPosTowards(::Mob &mob, int xzDist, int yDist, ::Vec3 const &towardsPos)
Definition Random.h:11
Definition Randomize.h:13
Definition Vec3.h:10
Definition IntRange.h:11