LeviLamina
Loading...
Searching...
No Matches
EditorJigsawService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/JigsawJsonType.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/scripting/runtime/Result_deprecated.h"
10#include "mc/editor/serviceproviders/EditorJigsawServiceProvider.h"
11#include "mc/editor/services/IEditorService.h"
12
13// auto generated forward declare list
14// clang-format off
15class BlockPos;
16class FeatureRegistry;
21class WeakEntityRef;
22namespace Bedrock::PubSub { class Subscription; }
23namespace Editor { class IEditorPlayer; }
24namespace Editor { class ServiceProviderCollection; }
25namespace Editor::ScriptModule { class ScriptClipboardItem; }
26namespace Editor::Services { struct EditorJigsawSection; }
27namespace Editor::Services { struct EditorRegistryFile; }
28// clang-format on
29
30namespace Editor::Services {
31
32class EditorJigsawService : public ::Editor::Services::IEditorService,
34public:
35 // EditorJigsawService inner types declare
36 // clang-format off
37 struct TemplatePoolData;
38 // clang-format on
39
40 // EditorJigsawService inner types define
41 struct TemplatePoolData {
42 public:
43 // member variables
44 // NOLINTBEGIN
48 // NOLINTEND
49
50 public:
51 // prevent constructor by default
52 TemplatePoolData& operator=(TemplatePoolData const&);
53 TemplatePoolData(TemplatePoolData const&);
54 TemplatePoolData();
55
56 public:
57 // member functions
58 // NOLINTBEGIN
59#ifdef LL_PLAT_S
60 MCNAPI TemplatePoolData(
61 ::std::string const& templateId,
62 ::std::set<::std::string> const& structNames,
63 ::std::map<::std::string, ::std::set<::std::string>> const& structTargetNames
64 );
65#endif
66
68 // NOLINTEND
69
70 public:
71 // constructor thunks
72 // NOLINTBEGIN
73#ifdef LL_PLAT_S
74 MCNAPI void* $ctor(
75 ::std::string const& templateId,
76 ::std::set<::std::string> const& structNames,
77 ::std::map<::std::string, ::std::set<::std::string>> const& structTargetNames
78 );
79#endif
80 // NOLINTEND
81
82 public:
83 // destructor thunk
84 // NOLINTBEGIN
85 MCNAPI void $dtor();
86 // NOLINTEND
87 };
88
89public:
90 // member variables
91 // NOLINTBEGIN
100 // NOLINTEND
101
102public:
103 // prevent constructor by default
104 EditorJigsawService& operator=(EditorJigsawService const&);
105 EditorJigsawService(EditorJigsawService const&);
106 EditorJigsawService();
107
108public:
109 // virtual functions
110 // NOLINTBEGIN
111 virtual ~EditorJigsawService() /*override*/;
112
113 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
114
115 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
116
117 virtual ::Scripting::Result_deprecated<void> ready() /*override*/;
118
119 virtual ::std::string_view getServiceName() const /*override*/;
120
121 virtual ::std::string getJigsawExportDirectory() /*override*/;
122
123 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::string> getEmptyJigsawFiles() /*override*/;
124
125 virtual ::std::vector<::std::string> getJigsawRegistryList() /*override*/;
126
127 virtual ::JigsawStructureRegistry* getJigsawRegistry(::std::string const& registryName) /*override*/;
128
129 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
130 getJigsawRegistryJson(::std::string const& registryName) /*override*/;
131
132 virtual void setJigsawRegistry(
133 ::std::string const& registryName,
134 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
135 bool shouldSaveFiles
136 ) /*override*/;
137
138 virtual void deleteJigsawRegistry(::std::string const& registryName) /*override*/;
139
140 virtual void generateJigsawPreview(
141 ::std::string const& registryName,
142 ::std::string const& startPool,
143 ::std::string const& startTarget,
144 ::BlockPos const& seed,
145 int const depth,
146 int const maxHorizontalDistanceFromCenter,
147 bool const validateRegistry,
148 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
149 ::WeakEntityRef playerRef
150 ) /*override*/;
151
152 virtual ::JigsawEditorData const getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef) /*override*/;
153
154 virtual void
155 setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData) /*override*/;
156
157 virtual ::Bedrock::PubSub::Subscription
158 listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback) /*override*/;
159
160 virtual ::Bedrock::PubSub::Subscription listenForGenerateJigsawPreview(
161 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
162 ) /*override*/;
163 // NOLINTEND
164
165public:
166 // member functions
167 // NOLINTBEGIN
168 MCNAPI explicit EditorJigsawService(::Editor::ServiceProviderCollection& providers);
169
171 ::Bedrock::NotNullNonOwnerPtr<::IStructureTemplateManager> structureManager,
172 ::FeatureRegistry& featureRegistry,
173 ::JigsawStructureRegistry& jigsawStructureRegistry
174 );
175
177
178 MCNAPI void _saveFile(
179 ::Editor::Services::EditorRegistryFile& regFile,
180 ::Core::PathBuffer<::std::string> jigsawPath,
181 ::Editor::Services::JigsawJsonType fileType,
182 ::std::vector<::std::string>& outErrors
183 );
184
185 MCNAPI void _saveJigsawRegistryFiles(::std::string const& registryName);
186
187 MCNAPI bool
188 _validateRegistry(::std::string registryName, ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> editorPlayer);
189 // NOLINTEND
190
191public:
192 // static variables
193 // NOLINTBEGIN
194 MCNAPI static ::std::string_view const& SERVICE_NAME();
195 // NOLINTEND
196
197public:
198 // constructor thunks
199 // NOLINTBEGIN
200 MCNAPI void* $ctor(::Editor::ServiceProviderCollection& providers);
201 // NOLINTEND
202
203public:
204 // destructor thunk
205 // NOLINTBEGIN
206 MCNAPI void $dtor();
207 // NOLINTEND
208
209public:
210 // virtual function thunks
211 // NOLINTBEGIN
212 MCNAPI ::Scripting::Result_deprecated<void> $init();
213
214 MCNAPI ::Scripting::Result_deprecated<void> $quit();
215
216 MCNAPI ::Scripting::Result_deprecated<void> $ready();
217
218 MCNAPI ::std::string_view $getServiceName() const;
219
220 MCNAPI ::std::string $getJigsawExportDirectory();
221
222 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::string> $getEmptyJigsawFiles();
223
224 MCNAPI ::std::vector<::std::string> $getJigsawRegistryList();
225
226 MCNAPI ::JigsawStructureRegistry* $getJigsawRegistry(::std::string const& registryName);
227
228 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
229 $getJigsawRegistryJson(::std::string const& registryName);
230
232 ::std::string const& registryName,
233 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
234 bool shouldSaveFiles
235 );
236
237 MCNAPI void $deleteJigsawRegistry(::std::string const& registryName);
238
240 ::std::string const& registryName,
241 ::std::string const& startPool,
242 ::std::string const& startTarget,
243 ::BlockPos const& seed,
244 int const depth,
245 int const maxHorizontalDistanceFromCenter,
246 bool const validateRegistry,
247 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
248 ::WeakEntityRef playerRef
249 );
250
251 MCNAPI ::JigsawEditorData const $getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef);
252
253 MCNAPI void $setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData);
254
255 MCNAPI ::Bedrock::PubSub::Subscription
256 $listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback);
257
258 MCNAPI ::Bedrock::PubSub::Subscription $listenForGenerateJigsawPreview(
259 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
260 );
261
262
263 // NOLINTEND
264
265public:
266 // vftables
267 // NOLINTBEGIN
269
270 MCNAPI static void** $vftableForIEditorService();
271 // NOLINTEND
272};
273
274} // namespace Editor::Services
Definition Subscription.h:10
Definition BlockPos.h:19
Definition IEditorPlayer.h:16
Definition ScriptClipboardItem.h:25
Definition ServiceProviderCollection.h:7
Definition EditorJigsawServiceProvider.h:22
MCAPI void _loadBehaviorPackJigsawRegistries(::ResourcePackManager &packManager)
static MCAPI ::std::string_view const & SERVICE_NAME()
MCAPI void _bootstrapJigsawRegistry(::Bedrock::NotNullNonOwnerPtr<::IStructureTemplateManager > structureManager, ::FeatureRegistry &featureRegistry, ::JigsawStructureRegistry &jigsawStructureRegistry)
MCAPI ::Scripting::Result_deprecated< void > $ready()
MCAPI void _saveFile(::Editor::Services::EditorRegistryFile &regFile, ::Core::PathBuffer<::std::string > jigsawPath, ::Editor::Services::JigsawJsonType fileType, ::std::vector<::std::string > &outErrors)
MCAPI::Bedrock::PubSub::Subscription $listenForSetJigsawRegistry(::std::function< void(::std::vector<::std::string >)> callback)
MCAPI::JigsawStructureRegistry * $getJigsawRegistry(::std::string const &registryName)
MCAPI void $deleteJigsawRegistry(::std::string const &registryName)
MCAPI::Bedrock::PubSub::Subscription $listenForGenerateJigsawPreview(::std::function< void(::std::vector<::Editor::Services::EditorJigsawSection >)> callback)
MCAPI::std::string_view $getServiceName() const
static MCAPI void ** $vftableForEditorJigsawServiceProvider()
MCAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile > > $getJigsawRegistryJson(::std::string const &registryName)
MCAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::string > $getEmptyJigsawFiles()
MCAPI void $generateJigsawPreview(::std::string const &registryName, ::std::string const &startPool, ::std::string const &startTarget, ::BlockPos const &seed, int const depth, int const maxHorizontalDistanceFromCenter, bool const validateRegistry, ::Editor::ScriptModule::ScriptClipboardItem const &clipboardItem, ::WeakEntityRef playerRef)
MCAPI void $setJigsawBlockData(::BlockPos &pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData)
MCAPI bool _validateRegistry(::std::string registryName, ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer > editorPlayer)
MCAPI void _saveJigsawRegistryFiles(::std::string const &registryName)
static MCAPI void ** $vftableForIEditorService()
MCAPI void $setJigsawRegistry(::std::string const &registryName, ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile > > data, bool shouldSaveFiles)
MCAPI::std::string $getJigsawExportDirectory()
MCAPI void * $ctor(::Editor::ServiceProviderCollection &providers)
MCAPI ::Scripting::Result_deprecated< void > $quit()
MCAPI ::std::vector<::std::string > $getJigsawRegistryList()
MCAPI::JigsawEditorData const $getJigsawBlockData(::BlockPos &pos, ::WeakEntityRef playerRef)
MCAPI ::Scripting::Result_deprecated< void > $init()
Definition IEditorService.h:11
Definition FeatureRegistry.h:19
Definition IStructureTemplateManager.h:16
Definition JigsawEditorData.h:14
Definition JigsawStructureRegistry.h:22
Definition ResourcePackManager.h:30
Definition WeakEntityRef.h:14
STL namespace.
Definition EditorJigsawSection.h:7
Definition EditorRegistryFile.h:7
Definition Alias.h:14