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/CommandSelectorResults.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class BlockPos;
13class BlockSource;
14class ChunkPos;
15class CommandArea;
16class CommandOrigin;
17class CommandOutput;
18class CommandRegistry;
19class Random;
20class Vec2;
21// clang-format on
22
24public:
25 // member variables
26 // NOLINTBEGIN
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 // vIndex: 2
45 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
46
47 // vIndex: 0
48 virtual ~SpreadPlayersCommand() /*override*/ = default;
49 // NOLINTEND
50
51public:
52 // static functions
53 // NOLINTBEGIN
54 MCAPI static bool _checkPositionValid(
55 ::CommandOrigin const& origin,
56 ::BlockPos const& checkPos,
57 ::std::optional<short> maxHeight,
58 ::std::map<::ChunkPos, ::std::unique_ptr<::CommandArea>>& areas,
59 int commandVersion
60 );
61
62 MCAPI static short
63 _getTeleportHeight(::BlockSource& region, int x, ::std::optional<short> maxHeight, int z, int commandVersion);
64
65 MCAPI static float _setPlayerPositions(
67 ::std::vector<::Vec2>& positions,
68 ::std::optional<short> maxHeight,
69 ::std::map<::ChunkPos, ::std::unique_ptr<::CommandArea>>& areas,
70 int commandVersion
71 );
72
73 MCAPI static bool _spreadEntities(
74 ::CommandOutput& output,
76 ::CommandOrigin const& origin,
77 ::Vec2 const& center,
78 float spreadDist,
79 float maxDistFromCenter,
80 ::std::optional<short> maxHeight,
81 int commandVersion
82 );
83
84 MCAPI static ::std::vector<::Vec2>
85 createInitialPositions(::Random& random, int count, ::Vec2 const& minPos, ::Vec2 const& maxPos);
86
87 MCAPI static bool isDangerousSpawn(
88 ::BlockSource& region,
89 ::BlockPos const& checkPos,
90 short minHeight,
91 ::std::optional<short> maxHeight,
92 int commandVersion
93 );
94
95 MCAPI static void setup(::CommandRegistry& registry);
96
97 MCAPI static bool spreadPositions(
98 ::CommandOutput& output,
99 ::Random& random,
100 ::CommandOrigin const& origin,
101 ::Vec2 const& center,
102 float spreadDist,
103 ::Vec2 const& minPos,
104 ::Vec2 const& maxPos,
105 ::std::vector<::Vec2>& positions,
106 ::std::optional<short> maxHeight,
107 ::std::map<::ChunkPos, ::std::unique_ptr<::CommandArea>>& areas,
108 int commandVersion
109 );
110 // NOLINTEND
111
112public:
113 // destructor thunk
114 // NOLINTBEGIN
115
116 // NOLINTEND
117
118public:
119 // virtual function thunks
120 // NOLINTBEGIN
121 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
122 // NOLINTEND
123
124public:
125 // vftables
126 // NOLINTBEGIN
127 MCAPI static void** $vftable();
128 // NOLINTEND
129};
Definition Actor.h:104
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition ChunkPos.h:11
Definition CommandArea.h:5
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:44
Definition CommandSelectorResults.h:6
Definition Command.h:17
Definition Random.h:16
Definition SpreadPlayersCommand.h:23
Definition Vec2.h:5
Definition Alias.h:14