LeviLamina
Loading...
Searching...
No Matches
ScriptItemComponents.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
8#include "mc/deps/scripting/lifetime_registry/WeakTypedObjectHandle.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace ScriptModuleMinecraft { class IScriptItemComponentFactory; }
13namespace ScriptModuleMinecraft { class IScriptItemCustomComponentReader; }
14namespace ScriptModuleMinecraft { class ScriptComponentTypeEnumBuilder; }
15namespace ScriptModuleMinecraft { class ScriptItemComponent; }
16namespace ScriptModuleMinecraft { class ScriptItemStack; }
17namespace Scripting { class ModuleBindingBuilder; }
18namespace Scripting { class WeakLifetimeScope; }
19namespace Scripting { struct Version; }
20// clang-format on
21
22namespace ScriptModuleMinecraft {
23
24class ScriptItemComponents {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<
29 8,
30 64,
31 ::std::
32 unordered_map<::std::string_view, ::std::shared_ptr<::ScriptModuleMinecraft::IScriptItemComponentFactory>>>
33 mNativeFactories;
34 ::ll::TypedStorage<8, 16, ::WeakRef<::ScriptModuleMinecraft::IScriptItemCustomComponentReader const>>
35 mCustomComponentReader;
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
40 ScriptItemComponents();
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI explicit ScriptItemComponents(
47 );
48
49 MCAPI ::std::unordered_map<
50 ::std::string_view,
51 ::std::shared_ptr<::ScriptModuleMinecraft::IScriptItemComponentFactory>> const&
52 _getOrCreateNativeItemComponentFactories() const;
53
54 MCAPI void bind(
56 ::Scripting::Version const& scriptingVersion,
58 );
59
60 MCAPI ::std::vector<::std::string_view> getSupportedItemComponentIds(
62 bool includeCustom
63 );
64
65 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent>>
66 tryCreateComponent(
67 ::std::string_view componentName,
70 bool includeCustom
71 );
72
73 MCAPI ::std::shared_ptr<::ScriptModuleMinecraft::IScriptItemComponentFactory> const&
74 tryGetFactory(::std::string_view componentName);
75 // NOLINTEND
76
77public:
78 // constructor thunks
79 // NOLINTBEGIN
80 MCFOLD void*
82 // NOLINTEND
83};
84
85} // namespace ScriptModuleMinecraft
Definition IScriptItemComponentFactory.h:18
Definition IScriptItemCustomComponentReader.h:18
Definition ScriptComponentTypeEnumBuilder.h:18
Definition ScriptItemComponent.h:20
Definition ScriptItemStack.h:32
Definition ModuleBindingBuilder.h:27
Definition StrongTypedObjectHandle.h:8
Definition WeakLifetimeScope.h:7
Definition WeakTypedObjectHandle.h:8
Definition WeakRef.h:8
Definition Version.h:7