LeviLamina
Loading...
Searching...
No Matches
PlaceCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/CommandFilePath.h"
7#include "mc/server/commands/CommandPosition.h"
8#include "mc/server/commands/ServerCommand.h"
9#include "mc/world/level/levelgen/v2/LiquidSettings.h"
10
11// auto generated forward declare list
12// clang-format off
13class BlockPos;
14class BoundingBox;
15class CommandOrigin;
16class CommandOutput;
17class CommandRegistry;
18class Dimension;
19class Experiments;
20class HashedString;
21class IFeature;
23// clang-format on
24
26public:
27 // PlaceCommand inner types define
28 enum class PlaceAction : int {
29 Structure = 0,
30 Jigsaw = 1,
31 Feature = 2,
32 FeatureRule = 3,
33 };
34
35 using BiomeDecorationFeatureMap = ::std::unordered_map<::HashedString, ::BiomeDecorationFeature>;
36
37 using PlaceResult = ::nonstd::expected<::BoundingBox, ::std::string_view>;
38
39public:
40 // member variables
41 // NOLINTBEGIN
42 ::ll::TypedStorage<4, 4, ::PlaceCommand::PlaceAction> mPlaceAction;
43 ::ll::TypedStorage<8, 32, ::CommandFilePath> mPool;
44 ::ll::TypedStorage<8, 32, ::std::string> mTarget;
45 ::ll::TypedStorage<4, 4, int> mMaxDepth;
46 ::ll::TypedStorage<4, 16, ::CommandPosition> mPosition;
47 ::ll::TypedStorage<8, 32, ::std::string> mStructureOrFeatureName;
48 ::ll::TypedStorage<8, 8, ::IFeature const*> mFeature;
49 ::ll::TypedStorage<1, 1, ::br::worldgen::LiquidSettings> mLiquidSettings;
50 ::ll::TypedStorage<1, 1, bool> mPosIsSet;
51 ::ll::TypedStorage<1, 1, bool> mIgnoreStartHeight;
52 ::ll::TypedStorage<1, 1, bool> mKeepJigsaws;
53 ::ll::TypedStorage<1, 1, bool> mIncludeEntities;
54 // NOLINTEND
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
60
61 virtual ~PlaceCommand() /*override*/ = default;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI void _placeFeature(
68 ::IFeature const* feature,
69 ::CommandPosition const& pos,
70 ::CommandOrigin const& origin,
71 ::CommandOutput& output
72 ) const;
73
74 MCAPI void _placeFeatureRule(
75 ::std::string const& featureRuleName,
76 ::CommandPosition const& pos,
77 ::CommandOrigin const& origin,
78 ::CommandOutput& output
79 ) const;
80
81 MCAPI void _placeJigsaw(
82 ::std::string const& pool,
83 ::std::string const& target,
84 schar maxDepth,
85 ::CommandPosition const& pos,
86 bool keepJigsaws,
87 bool includeEntities,
88 ::br::worldgen::LiquidSettings liquidSettings,
89 ::CommandOrigin const& origin,
90 ::CommandOutput& output
91 ) const;
92
93 MCAPI void _placeStructure(
94 ::std::string const& id,
95 ::CommandPosition const& pos,
96 bool ignoreStartHeight,
97 bool keepJigsaws,
98 bool includeEntities,
99 ::br::worldgen::LiquidSettings liquidSettings,
100 ::CommandOrigin const& origin,
101 ::CommandOutput& output
102 ) const;
103 // NOLINTEND
104
105public:
106 // static functions
107 // NOLINTBEGIN
108 MCAPI static ::nonstd::expected<::BoundingBox, ::std::string_view> placeJigsaw(
109 ::std::string const& pool,
110 ::std::string const& target,
111 schar maxDepth,
112 ::BlockPos const& position,
113 bool keepJigsaws,
114 bool includeEntities,
115 ::Dimension& dimension,
116 ::br::worldgen::LiquidSettings liquidSettings
117 );
118
119 MCAPI static ::nonstd::expected<::BoundingBox, ::std::string_view> placeStructure(
120 ::std::string const& id,
121 ::BlockPos const& pos,
122 ::Dimension& dimension,
123 bool ignoreStartHeight,
124 bool keepJigsaws,
125 bool includeEntities,
126 ::br::worldgen::LiquidSettings liquidSettings
127 );
128
129 MCAPI static void setup(
130 ::CommandRegistry& registry,
131 ::std::unordered_map<::HashedString, ::BiomeDecorationFeature> const& biomeDecorationFeatures,
132 ::Experiments const&
133 );
134 // NOLINTEND
135
136public:
137 // virtual function thunks
138 // NOLINTBEGIN
139 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
140
141
142 // NOLINTEND
143
144public:
145 // vftables
146 // NOLINTBEGIN
147 MCNAPI static void** $vftable();
148 // NOLINTEND
149};
Definition BlockPos.h:19
Definition BoundingBox.h:13
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandPosition.h:15
Definition CommandRegistry.h:50
Definition Dimension.h:86
Definition Experiments.h:14
Definition Feature.h:18
Definition HashedString.h:5
Definition IFeature.h:18
Definition PlaceCommand.h:25
static MCAPI void ** $vftable()
Definition ServerCommand.h:22
Definition BiomeDecorationFeature.h:15