LeviLamina
Loading...
Searching...
No Matches
ScriptBlockCustomComponentsRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
7#include "mc/deps/scripting/runtime/Result.h"
8#include "mc/scripting/modules/minecraft/ScriptCustomComponentRegistry.h"
9#include "mc/scripting/modules/minecraft/block/IScriptBlockCustomComponentReader.h"
10#include "mc/scripting/modules/minecraft/events/ScriptBlockCustomComponentEventTypes.h"
11#include "mc/scripting/modules/minecraft/events/metadata/ScriptCustomComponentEventMetadata.h"
12#include "mc/world/events/ScriptDeferredEventListener.h"
13
14// auto generated forward declare list
15// clang-format off
16class Block;
18class BlockPos;
19class BlockType;
20class HashedString;
21class IBlockSource;
25namespace BlockEvents { class BlockBreakEvent; }
26namespace BlockEvents { class BlockEntityFallOnEvent; }
27namespace BlockEvents { class BlockPlaceEvent; }
28namespace BlockEvents { class BlockPlayerDestroyEvent; }
29namespace BlockEvents { class BlockPlayerInteractEvent; }
30namespace BlockEvents { class BlockPlayerPlacingEvent; }
31namespace BlockEvents { class BlockQueuedTickEvent; }
32namespace BlockEvents { class BlockRandomTickEvent; }
33namespace BlockEvents { class BlockRandomTickLegacyEvent; }
34namespace BlockEvents { class BlockStepOffEvent; }
35namespace BlockEvents { class BlockStepOnEvent; }
36namespace ScriptModuleMinecraft { class ScriptBlockCustomComponentInterface; }
37namespace ScriptModuleMinecraft { class ScriptCustomComponentParameterCache; }
38namespace ScriptModuleMinecraft { struct ScriptBlockCustomComponentAlreadyRegisteredError; }
39namespace ScriptModuleMinecraft { struct ScriptBlockCustomComponentReloadNewComponentError; }
40namespace ScriptModuleMinecraft { struct ScriptBlockCustomComponentReloadNewEventError; }
41namespace ScriptModuleMinecraft { struct ScriptBlockCustomComponentReloadVersionError; }
42namespace ScriptModuleMinecraft { struct ScriptCustomComponentInvalidRegistryError; }
43namespace ScriptModuleMinecraft { struct ScriptCustomComponentParameters; }
44namespace Scripting { class ModuleBindingBuilder; }
45namespace Scripting { class WeakLifetimeScope; }
46// clang-format on
47
48namespace ScriptModuleMinecraft {
49
53public:
54 // ScriptBlockCustomComponentsRegistry inner types declare
55 // clang-format off
57 // clang-format on
58
59 // ScriptBlockCustomComponentsRegistry inner types define
61 public:
62 // member variables
63 // NOLINTBEGIN
69 // NOLINTEND
70
71 public:
72 // prevent constructor by default
76
77 public:
78 // member functions
79 // NOLINTBEGIN
80 MCNAPI void setClosureData(
83 );
84
86 // NOLINTEND
87
88 public:
89 // destructor thunk
90 // NOLINTBEGIN
91 MCNAPI void $dtor();
92 // NOLINTEND
93 };
94
95public:
96 // member variables
97 // NOLINTBEGIN
105 // NOLINTEND
106
107public:
108 // prevent constructor by default
112
113public:
114 // virtual functions
115 // NOLINTBEGIN
116 // vIndex: 9
117 virtual void onPreFlushAfterEvents() /*override*/;
118
119 // vIndex: 6
120 virtual void onFlushBlockCustomComponentAfterEvents(::ScriptDeferredFlushTracker& deferredTracker) /*override*/;
121
122 // vIndex: 10
123 virtual void onPostFlushAfterEvents() /*override*/;
124
125 // vIndex: 2
126 virtual void _onScriptInitializationComplete() /*override*/;
127
128 // vIndex: 1
129 virtual void _onReload() /*override*/;
130
131 // vIndex: 0
132 virtual ~ScriptBlockCustomComponentsRegistry() /*override*/;
133
134 // vIndex: 1
135 virtual ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptCustomComponentParameters> const&
136 tryGetCustomComponentParametersForItem(
137 ::IBlockSource const& region,
138 ::BlockPos blockPos,
139 ::std::string_view componentName,
141 ) const /*override*/;
142 // NOLINTEND
143
144public:
145 // member functions
146 // NOLINTBEGIN
149 ::ScriptDeferredEventCoordinator& deferredEventCoordinator,
151 );
152
154 ::HashedString const& compName,
156 );
157
158 MCNAPI ::Scripting::Result<
159 void,
166 ::std::_List_iterator<::std::_List_val<::std::_List_simple_types<::std::pair<
167 ::HashedString const,
169 compIt,
170 ::HashedString const& name
171 );
172
173 MCNAPI ::Scripting::Result<
174 void,
181 ::std::_List_iterator<::std::_List_val<::std::_List_simple_types<::std::pair<
182 ::HashedString const,
184 compIt,
185 ::HashedString const& name,
187 );
188
190 ::BlockType& block,
191 ::std::vector<::gsl::not_null<::BlockCustomComponentsComponent*>> const& comps
192 );
193
195
196 MCNAPI bool
197 hasSubscriptionFor(::ScriptModuleMinecraft::ScriptBlockCustomComponentEventTypes type, ::Block const& block) const;
198
199 MCNAPI void onBreak(::BlockEvents::BlockBreakEvent const& eventData) const;
200
202
203 MCNAPI void onPlace(::BlockEvents::BlockPlaceEvent const& eventData) const;
204
205 MCNAPI void onPlayerBreak(::BlockEvents::BlockPlayerDestroyEvent const& eventData) const;
206
208
209 MCNAPI void onQueuedTick(::BlockEvents::BlockQueuedTickEvent const& eventData) const;
210
211 MCNAPI void onRandomTick(::BlockEvents::BlockRandomTickEvent const& eventData) const;
212
214
215 MCNAPI void onStepOff(::BlockEvents::BlockStepOffEvent const& eventData) const;
216
217 MCNAPI void onStepOn(::BlockEvents::BlockStepOnEvent const& eventData) const;
218
219 MCNAPI ::Scripting::Result<
220 void,
227 ::HashedString const& name,
230 );
231
232 MCNAPI ::Scripting::Result<
233 void,
240 ::HashedString const& name,
243 );
244 // NOLINTEND
245
246public:
247 // static functions
248 // NOLINTBEGIN
249 MCNAPI static ::ScriptModuleMinecraft::ScriptCustomComponentEventMetadata<
252
253 MCNAPI static void bind(::Scripting::ModuleBindingBuilder& moduleBuilder);
254 // NOLINTEND
255
256public:
257 // constructor thunks
258 // NOLINTBEGIN
259 MCNAPI void* $ctor(
261 ::ScriptDeferredEventCoordinator& deferredEventCoordinator,
263 );
264 // NOLINTEND
265
266public:
267 // destructor thunk
268 // NOLINTBEGIN
269 MCNAPI void $dtor();
270 // NOLINTEND
271
272public:
273 // virtual function thunks
274 // NOLINTBEGIN
276
278
280
282
283 MCNAPI void $_onReload();
284
285 MCNAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptCustomComponentParameters> const&
287 ::IBlockSource const& region,
288 ::BlockPos blockPos,
289 ::std::string_view componentName,
291 ) const;
292 // NOLINTEND
293
294public:
295 // vftables
296 // NOLINTBEGIN
298
300
302 // NOLINTEND
303};
304
305} // namespace ScriptModuleMinecraft
Definition BlockCustomComponentsComponent.h:19
Definition BlockBreakEvent.h:17
Definition BlockEntityFallOnEvent.h:16
Definition BlockPlaceEvent.h:16
Definition BlockPlayerDestroyEvent.h:17
Definition BlockPlayerInteractEvent.h:17
Definition BlockPlayerPlacingEvent.h:18
Definition BlockQueuedTickEvent.h:16
Definition BlockRandomTickEvent.h:16
Definition BlockRandomTickLegacyEvent.h:16
Definition BlockStepOffEvent.h:16
Definition BlockStepOnEvent.h:16
Definition BlockPos.h:17
Definition BlockType.h:84
Definition Block.h:38
Definition HashedString.h:5
Definition IBlockSource.h:37
Definition ScriptDeferredEventCoordinator.h:18
Definition ScriptDeferredEventListener.h:10
Definition ScriptDeferredFlushTracker.h:13
Definition IScriptBlockCustomComponentReader.h:18
Definition ScriptBlockCustomComponentInterface.h:10
Definition ScriptBlockCustomComponentsRegistry.h:52
MCAPI ::Scripting::Result< void, ::ScriptModuleMinecraft::ScriptCustomComponentInvalidRegistryError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentAlreadyRegisteredError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadVersionError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewEventError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewComponentError > tryRegisterCustomComponent(::HashedString const &name, ::ScriptModuleMinecraft::ScriptBlockCustomComponentInterface &&closures, ::Scripting::WeakLifetimeScope const &scope)
MCAPI void onPlayerBreak(::BlockEvents::BlockPlayerDestroyEvent const &eventData) const
MCAPI void _bindComponentToCereal(::HashedString const &compName, ::ScriptModuleMinecraft::ScriptBlockCustomComponentInterface const &closures)
MCAPI void onStepOff(::BlockEvents::BlockStepOffEvent const &eventData) const
MCAPI void onPlace(::BlockEvents::BlockPlaceEvent const &eventData) const
MCAPI void onEntityFallOn(::BlockEvents::BlockEntityFallOnEvent &eventData) const
MCAPI void onPlayerInteract(::BlockEvents::BlockPlayerInteractEvent &eventData) const
MCAPI void onRandomTickLegacy(::BlockEvents::BlockRandomTickLegacyEvent const &eventData) const
MCAPI ::Scripting::Result< void, ::ScriptModuleMinecraft::ScriptCustomComponentInvalidRegistryError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentAlreadyRegisteredError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadVersionError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewEventError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewComponentError > tryRegisterCustomComponentV1(::HashedString const &name, ::ScriptModuleMinecraft::ScriptBlockCustomComponentInterface &&closures, ::Scripting::WeakLifetimeScope const &scope)
MCAPI ::Scripting::Result< void, ::ScriptModuleMinecraft::ScriptCustomComponentInvalidRegistryError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentAlreadyRegisteredError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadVersionError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewEventError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewComponentError > _componentReloadRegistrationValidators(::std::_List_iterator<::std::_List_val<::std::_List_simple_types<::std::pair< ::HashedString const, ::ScriptModuleMinecraft::ScriptBlockCustomComponentsRegistry::ScriptBlockCustomComponentData > > > > const &compIt, ::HashedString const &name, ::ScriptModuleMinecraft::ScriptBlockCustomComponentInterface const &closures)
MCAPI void onQueuedTick(::BlockEvents::BlockQueuedTickEvent const &eventData) const
MCAPI void onBreak(::BlockEvents::BlockBreakEvent const &eventData) const
MCAPI void onRandomTick(::BlockEvents::BlockRandomTickEvent const &eventData) const
MCAPI void $onFlushBlockCustomComponentAfterEvents(::ScriptDeferredFlushTracker &deferredTracker)
MCAPI void _registerBlockForEventing(::BlockType &block, ::std::vector<::gsl::not_null<::BlockCustomComponentsComponent * > > const &comps)
MCAPI ScriptBlockCustomComponentsRegistry(::ServerScriptManagerEvents &events, ::ScriptDeferredEventCoordinator &deferredEventCoordinator, ::ScriptModuleMinecraft::ScriptCustomComponentParameterCache &parameterCache)
static MCAPI void bind(::Scripting::ModuleBindingBuilder &moduleBuilder)
MCAPI void * $ctor(::ServerScriptManagerEvents &events, ::ScriptDeferredEventCoordinator &deferredEventCoordinator, ::ScriptModuleMinecraft::ScriptCustomComponentParameterCache &parameterCache)
MCAPI void onStepOn(::BlockEvents::BlockStepOnEvent const &eventData) const
MCAPI void beforeOnPlayerPlace(::BlockEvents::BlockPlayerPlacingEvent &eventData) const
static MCAPI ::ScriptModuleMinecraft::ScriptCustomComponentEventMetadata< ::ScriptModuleMinecraft::ScriptBlockCustomComponentInterface > const _getEventMetadata()
MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptCustomComponentParameters > const & $tryGetCustomComponentParametersForItem(::IBlockSource const &region, ::BlockPos blockPos, ::std::string_view componentName, ::Scripting::WeakLifetimeScope const &scope) const
MCAPI bool hasSubscriptionFor(::ScriptModuleMinecraft::ScriptBlockCustomComponentEventTypes type, ::Block const &block) const
MCAPI ::Scripting::Result< void, ::ScriptModuleMinecraft::ScriptCustomComponentInvalidRegistryError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentAlreadyRegisteredError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadVersionError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewEventError, ::ScriptModuleMinecraft::ScriptBlockCustomComponentReloadNewComponentError > _componentRegistrationValidatorsCommon(::std::_List_iterator<::std::_List_val<::std::_List_simple_types<::std::pair< ::HashedString const, ::ScriptModuleMinecraft::ScriptBlockCustomComponentsRegistry::ScriptBlockCustomComponentData > > > > const &compIt, ::HashedString const &name)
Definition ScriptCustomComponentParameterCache.h:19
Definition ScriptCustomComponentRegistry.h:10
Definition ModuleBindingBuilder.h:29
Definition WeakLifetimeScope.h:7
Definition BlockRandomTickEvent.h:13
Definition ScriptBlockCustomComponentAlreadyRegisteredError.h:15
Definition ScriptBlockCustomComponentReloadNewComponentError.h:15
Definition ScriptBlockCustomComponentReloadNewEventError.h:15
Definition ScriptBlockCustomComponentReloadVersionError.h:15
MCAPI void setClosureData(::ScriptModuleMinecraft::ScriptBlockCustomComponentInterface &&closures, ::Scripting::WeakLifetimeScope const &scope)
Definition ScriptCustomComponentInvalidRegistryError.h:17
Definition ServerScriptManagerEvents.h:13
Definition Alias.h:14