Skip to content
LeviMC
English
AutoLightDark
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/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
8#include "mc/editor/JigsawJsonType.h"
9#include "mc/editor/serviceproviders/EditorJigsawServiceProvider.h"
10#include "mc/editor/services/IEditorService.h"
11
12// auto generated forward declare list
13// clang-format off
14class BlockPos;
17class WeakEntityRef;
18namespace Bedrock::PubSub { class Subscription; }
19namespace Editor { class IEditorPlayer; }
20namespace Editor { class ServiceProviderCollection; }
21namespace Editor::ScriptModule { class ScriptClipboardItem; }
22namespace Editor::Services { struct EditorJigsawSection; }
23namespace Editor::Services { struct EditorRegistryFile; }
24// clang-format on
25
26namespace Editor::Services {
27
28class EditorJigsawService : public ::Editor::Services::IEditorService,
30public:
31 // EditorJigsawService inner types declare
32 // clang-format off
33 struct TemplatePoolData;
34 // clang-format on
35
36 // EditorJigsawService inner types define
37 struct TemplatePoolData {
38 public:
39 // member variables
40 // NOLINTBEGIN
44 // NOLINTEND
45
46 public:
47 // prevent constructor by default
48 TemplatePoolData& operator=(TemplatePoolData const&);
49 TemplatePoolData(TemplatePoolData const&);
50 TemplatePoolData();
51 };
52
53public:
54 // member variables
55 // NOLINTBEGIN
64 // NOLINTEND
65
66public:
67 // prevent constructor by default
68 EditorJigsawService& operator=(EditorJigsawService const&);
69 EditorJigsawService(EditorJigsawService const&);
70 EditorJigsawService();
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
75 virtual ~EditorJigsawService() /*override*/ = default;
76
77 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
78
79 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
80
81 virtual ::Scripting::Result_deprecated<void> ready() /*override*/;
82
83 virtual ::std::string_view getServiceName() const /*override*/;
84
85 virtual ::std::string getJigsawExportDirectory() /*override*/;
86
87 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::string> getEmptyJigsawFiles() /*override*/;
88
89 virtual ::std::vector<::std::string> getJigsawRegistryList() /*override*/;
90
91 virtual ::JigsawStructureRegistry* getJigsawRegistry(::std::string const& registryName) /*override*/;
92
93 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
94 getJigsawRegistryJson(::std::string const& registryName) /*override*/;
95
96 virtual void setJigsawRegistry(
97 ::std::string const& registryName,
98 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
99 bool shouldSaveFiles
100 ) /*override*/;
101
102 virtual void deleteJigsawRegistry(::std::string const& registryName) /*override*/;
103
104 virtual void generateJigsawPreview(
105 ::std::string const& registryName,
106 ::std::string const& startPool,
107 ::std::string const& startTarget,
108 ::BlockPos const& seed,
109 int const depth,
110 int const maxHorizontalDistanceFromCenter,
111 bool const validateRegistry,
112 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
113 ::WeakEntityRef playerRef
114 ) /*override*/;
115
116 virtual ::JigsawEditorData const getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef) /*override*/;
117
118 virtual void
119 setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData) /*override*/;
120
121 virtual ::Bedrock::PubSub::Subscription
122 listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback) /*override*/;
123
124 virtual ::Bedrock::PubSub::Subscription listenForGenerateJigsawPreview(
125 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
126 ) /*override*/;
127 // NOLINTEND
128
129public:
130 // member functions
131 // NOLINTBEGIN
132 MCNAPI explicit EditorJigsawService(::Editor::ServiceProviderCollection& providers);
133
134 MCNAPI void _reportJigsawFileError(::std::string_view localizationKey, ::std::vector<::std::string> params);
135
136 MCNAPI void _saveJigsawRegistryFiles(::std::string const& registryName);
137
138 MCNAPI bool
139 _validateRegistry(::std::string registryName, ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> editorPlayer);
140 // NOLINTEND
141
142public:
143 // constructor thunks
144 // NOLINTBEGIN
145 MCNAPI void* $ctor(::Editor::ServiceProviderCollection& providers);
146 // NOLINTEND
147
148public:
149 // virtual function thunks
150 // NOLINTBEGIN
151 MCNAPI ::Scripting::Result_deprecated<void> $init();
152
153 MCNAPI ::Scripting::Result_deprecated<void> $quit();
154
155 MCNAPI ::Scripting::Result_deprecated<void> $ready();
156
157 MCNAPI ::std::string_view $getServiceName() const;
158
159 MCNAPI ::std::string $getJigsawExportDirectory();
160
161 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::string> $getEmptyJigsawFiles();
162
163 MCNAPI ::std::vector<::std::string> $getJigsawRegistryList();
164
165 MCNAPI ::JigsawStructureRegistry* $getJigsawRegistry(::std::string const& registryName);
166
167 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
168 $getJigsawRegistryJson(::std::string const& registryName);
169
171 ::std::string const& registryName,
172 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
173 bool shouldSaveFiles
174 );
175
176 MCNAPI void $deleteJigsawRegistry(::std::string const& registryName);
177
179 ::std::string const& registryName,
180 ::std::string const& startPool,
181 ::std::string const& startTarget,
182 ::BlockPos const& seed,
183 int const depth,
184 int const maxHorizontalDistanceFromCenter,
185 bool const validateRegistry,
186 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
187 ::WeakEntityRef playerRef
188 );
189
190 MCNAPI ::JigsawEditorData const $getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef);
191
192 MCNAPI void $setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData);
193
194 MCNAPI ::Bedrock::PubSub::Subscription
195 $listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback);
196
197 MCNAPI ::Bedrock::PubSub::Subscription $listenForGenerateJigsawPreview(
198 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
199 );
200
201
202 // NOLINTEND
203};
204
205} // namespace Editor::Services
Definition Subscription.h:10
Definition BlockPos.h:14
Definition IEditorPlayer.h:17
Definition ScriptClipboardItem.h:21
Definition ServiceProviderCollection.h:7
Definition EditorJigsawServiceProvider.h:22
MCAPI ::Scripting::Result_deprecated< void > $ready()
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
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)
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 void _reportJigsawFileError(::std::string_view localizationKey, ::std::vector<::std::string > params)
MCAPI ::Scripting::Result_deprecated< void > $init()
Definition IEditorService.h:11
Definition JigsawEditorData.h:14
Definition JigsawStructureRegistry.h:22
Definition WeakEntityRef.h:14
STL namespace.
Definition EditorJigsawSection.h:7
Definition EditorRegistryFile.h:7
Definition Alias.h:14