LeviLamina
Loading...
Searching...
No Matches
SpreadPlayersCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/Command.h"
7#include "mc/server/commands/CommandSelector.h"
8#include "mc/server/commands/CommandSelectorResults.h"
9#include "mc/server/commands/RelativeFloat.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BlockPos;
15class BlockSource;
16class ChunkPos;
17class CommandArea;
18class CommandOrigin;
19class CommandOutput;
20class CommandRegistry;
21class Random;
22class Vec2;
23// clang-format on
24
25class SpreadPlayersCommand : public ::Command {
26public:
27 // SpreadPlayersCommand inner types define
28 using CommandAreas = ::std::map<::ChunkPos, ::std::unique_ptr<::CommandArea>>;
29
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mTargets;
34 ::ll::TypedStorage<4, 8, ::RelativeFloat> mX;
35 ::ll::TypedStorage<4, 8, ::RelativeFloat> maxHeight;
36 ::ll::TypedStorage<4, 8, ::RelativeFloat> mZ;
37 ::ll::TypedStorage<4, 4, float> mDistance;
38 ::ll::TypedStorage<4, 4, float> mMaxRange;
39 // NOLINTEND
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI SpreadPlayersCommand();
51 // NOLINTEND
52
53public:
54 // static functions
55 // NOLINTBEGIN
56 MCAPI static bool _checkPositionValid(
57 ::CommandOrigin const& origin,
58 ::BlockPos const& checkPos,
59 ::std::optional<short> maxHeight,
60 ::std::map<::ChunkPos, ::std::unique_ptr<::CommandArea>>& areas,
61 int commandVersion
62 );
63
64 MCAPI static float _setPlayerPositions(
66 ::std::vector<::Vec2>& positions,
67 ::std::optional<short> maxHeight,
68 ::std::map<::ChunkPos, ::std::unique_ptr<::CommandArea>>& areas,
69 int commandVersion
70 );
71
72 MCAPI static bool _spreadEntities(
73 ::CommandOutput& output,
75 ::CommandOrigin const& origin,
76 ::Vec2 const& center,
77 float spreadDist,
78 float maxDistFromCenter,
79 ::std::optional<short> maxHeight,
80 int commandVersion
81 );
82
83 MCAPI static ::std::vector<::Vec2>
84 createInitialPositions(::Random& random, int count, ::Vec2 const& minPos, ::Vec2 const& maxPos);
85
86 MCAPI static bool isDangerousSpawn(
87 ::BlockSource& region,
88 ::BlockPos const& checkPos,
89 short minHeight,
90 ::std::optional<short> maxHeight,
91 int commandVersion
92 );
93
94 MCAPI static void setup(::CommandRegistry& registry);
95
96 MCAPI static bool spreadPositions(
97 ::CommandOutput& output,
98 ::Random& random,
99 ::CommandOrigin const& origin,
100 ::Vec2 const& center,
101 float spreadDist,
102 ::Vec2 const& minPos,
103 ::Vec2 const& maxPos,
104 ::std::vector<::Vec2>& positions,
105 ::std::optional<short> maxHeight,
106 ::std::map<::ChunkPos, ::std::unique_ptr<::CommandArea>>& areas,
107 int commandVersion
108 );
109 // NOLINTEND
110
111public:
112 // constructor thunks
113 // NOLINTBEGIN
114 MCAPI void* $ctor();
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
121
122
123 // NOLINTEND
124
125public:
126 // vftables
127 // NOLINTBEGIN
128 MCNAPI static void** $vftable();
129 // NOLINTEND
130};
Definition Actor.h:125
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition ChunkPos.h:11
Definition CommandArea.h:11
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition CommandSelectorResults.h:6
Definition Random.h:10
static MCAPI void ** $vftable()
Definition Vec2.h:5