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