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