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
60 // NOLINTEND
61
62 public:
63 // constructor thunks
64 // NOLINTBEGIN
65 MCNAPI_S void* $ctor(
66 ::std::string const& templateId,
67 ::std::set<::std::string> const& structNames,
68 ::std::map<::std::string, ::std::set<::std::string>> const& structTargetNames
69 );
70 // NOLINTEND
71
72 public:
73 // destructor thunk
74 // NOLINTBEGIN
75 MCNAPI void $dtor();
76 // NOLINTEND
77 };
78
79public:
80 // member variables
81 // NOLINTBEGIN
90 // NOLINTEND
91
92public:
93 // prevent constructor by default
94 EditorJigsawService& operator=(EditorJigsawService const&);
95 EditorJigsawService(EditorJigsawService const&);
96 EditorJigsawService();
97
98public:
99 // virtual functions
100 // NOLINTBEGIN
101 virtual ~EditorJigsawService() /*override*/;
102
103 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
104
105 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
106
107 virtual ::Scripting::Result_deprecated<void> ready() /*override*/;
108
109 virtual ::std::string_view getServiceName() const /*override*/;
110
111 virtual ::std::string getJigsawExportDirectory() /*override*/;
112
113 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::string> getEmptyJigsawFiles() /*override*/;
114
115 virtual ::std::vector<::std::string> getJigsawRegistryList() /*override*/;
116
117 virtual ::JigsawStructureRegistry* getJigsawRegistry(::std::string const& registryName) /*override*/;
118
119 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
120 getJigsawRegistryJson(::std::string const& registryName) /*override*/;
121
122 virtual void setJigsawRegistry(
123 ::std::string const& registryName,
124 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
125 bool shouldSaveFiles
126 ) /*override*/;
127
128 virtual void generateJigsawPreview(
129 ::std::string const& registryName,
130 ::std::string const& startPool,
131 ::std::string const& startTarget,
132 ::BlockPos const& seed,
133 int const depth,
134 int const maxHorizontalDistanceFromCenter,
135 bool const validateRegistry,
136 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
137 ::WeakEntityRef playerRef
138 ) /*override*/;
139
140 virtual ::JigsawEditorData const getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef) /*override*/;
141
142 virtual void
143 setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData) /*override*/;
144
145 virtual ::Bedrock::PubSub::Subscription
146 listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback) /*override*/;
147
148 virtual ::Bedrock::PubSub::Subscription listenForGenerateJigsawPreview(
149 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
150 ) /*override*/;
151 // NOLINTEND
152
153public:
154 // member functions
155 // NOLINTBEGIN
156 MCNAPI explicit EditorJigsawService(::Editor::ServiceProviderCollection& providers);
157
159 ::Bedrock::NotNullNonOwnerPtr<::IStructureTemplateManager> structureManager,
160 ::FeatureRegistry& featureRegistry,
161 ::JigsawStructureRegistry& jigsawStructureRegistry
162 );
163
165
166 MCNAPI void _saveFile(
167 ::Editor::Services::EditorRegistryFile& regFile,
168 ::Core::PathBuffer<::std::string> jigsawPath,
169 ::Editor::Services::JigsawJsonType fileType,
170 ::std::vector<::std::string>& outErrors
171 );
172
173 MCNAPI void _saveJigsawRegistryFiles(::std::string const& registryName);
174
175 MCNAPI bool
176 _validateRegistry(::std::string registryName, ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> editorPlayer);
177 // NOLINTEND
178
179public:
180 // static variables
181 // NOLINTBEGIN
182 MCNAPI static ::std::string_view const& SERVICE_NAME();
183 // NOLINTEND
184
185public:
186 // constructor thunks
187 // NOLINTBEGIN
188 MCNAPI void* $ctor(::Editor::ServiceProviderCollection& providers);
189 // NOLINTEND
190
191public:
192 // destructor thunk
193 // NOLINTBEGIN
194 MCNAPI void $dtor();
195 // NOLINTEND
196
197public:
198 // virtual function thunks
199 // NOLINTBEGIN
200 MCNAPI ::Scripting::Result_deprecated<void> $init();
201
202 MCNAPI ::Scripting::Result_deprecated<void> $quit();
203
204 MCNAPI ::Scripting::Result_deprecated<void> $ready();
205
206 MCNAPI ::std::string_view $getServiceName() const;
207
208 MCNAPI ::std::string $getJigsawExportDirectory();
209
210 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::string> $getEmptyJigsawFiles();
211
212 MCNAPI ::std::vector<::std::string> $getJigsawRegistryList();
213
214 MCNAPI ::JigsawStructureRegistry* $getJigsawRegistry(::std::string const& registryName);
215
216 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
217 $getJigsawRegistryJson(::std::string const& registryName);
218
220 ::std::string const& registryName,
221 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
222 bool shouldSaveFiles
223 );
224
226 ::std::string const& registryName,
227 ::std::string const& startPool,
228 ::std::string const& startTarget,
229 ::BlockPos const& seed,
230 int const depth,
231 int const maxHorizontalDistanceFromCenter,
232 bool const validateRegistry,
233 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
234 ::WeakEntityRef playerRef
235 );
236
237 MCNAPI ::JigsawEditorData const $getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef);
238
239 MCNAPI void $setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData);
240
241 MCNAPI ::Bedrock::PubSub::Subscription
242 $listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback);
243
244 MCNAPI ::Bedrock::PubSub::Subscription $listenForGenerateJigsawPreview(
245 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
246 );
247
248
249 // NOLINTEND
250
251public:
252 // vftables
253 // NOLINTBEGIN
255
256 MCNAPI static void** $vftableForIEditorService();
257 // NOLINTEND
258};
259
260} // 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::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:18
Definition IStructureTemplateManager.h:16
Definition JigsawEditorData.h:14
Definition JigsawStructureRegistry.h:22
Definition ResourcePackManager.h:29
Definition WeakEntityRef.h:14
STL namespace.
Definition EditorJigsawSection.h:7
Definition EditorRegistryFile.h:7
Definition Alias.h:14