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 BlockSource;
11class IRandom;
12class Mob;
13class Random;
14class Vec3;
15struct IntRange;
16// clang-format on
17
18class RandomPos {
19public:
20 // static functions
21 // NOLINTBEGIN
22 MCAPI static ::std::optional<::Vec3> generateRandomPos(
23 ::IRandom& random,
24 ::Mob& mob,
25 int xzDist,
26 int yDist,
27 int yOffset,
28 ::Vec3 const* dir,
29 bool canFly,
30 bool canSwim,
31 ::IntRange const& hoverHeight,
32 int tries,
33 ::SolidityCheckType blockTest
34 );
35
36 MCAPI static ::std::optional<::Vec3> generateRandomSpawnPos(
37 ::BlockSource& region,
38 ::Random& random,
39 ::Vec3 const& inPos,
40 int numAttempts,
41 int xzDist,
42 int yDist,
43 ::Vec3* dir
44 );
45
46 MCAPI static ::std::optional<::Vec3>
47 getPos(::Mob& mob, int xzDist, int yDist, int tries, ::SolidityCheckType blockTest);
48
49 MCAPI static ::std::optional<::Vec3>
50 getPosAvoid(::Mob& mob, int xzDist, int yDist, ::Vec3 const& avoidPos, ::SolidityCheckType blockTest, int tries);
51
52 MCAPI static ::std::optional<::Vec3> getPosInDirection(
53 ::Mob& mob,
54 int xzDist,
55 int yDist,
56 int yOffset,
57 bool canFly,
58 bool canSwim,
59 ::Vec3* direction,
60 ::IntRange const& hoverHeight,
61 int tries,
62 ::SolidityCheckType blockTest
63 );
64
65 MCAPI static ::std::optional<::Vec3> getPosTowards(::Mob& mob, int xzDist, int yDist, ::Vec3 const& towardsPos);
66 // NOLINTEND
67};
Definition BlockSource.h:71
Definition IRandom.h:10
Definition Mob.h:56
Definition RandomPos.h:18
Definition Random.h:10
Definition Vec3.h:10
Definition IntRange.h:10