LeviLamina
Loading...
Searching...
No Matches
ScriptItems.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
8// auto generated forward declare list
9// clang-format off
10class HashedString;
11class ItemRegistryRef;
12namespace ScriptModuleMinecraft { class ScriptItemType; }
13namespace Scripting { class ModuleBindingBuilder; }
14namespace Scripting { class WeakLifetimeScope; }
15// clang-format on
16
17namespace ScriptModuleMinecraft {
18
20public:
21 // member variables
22 // NOLINTBEGIN
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 ScriptItems& operator=(ScriptItems const&);
34
35public:
36 // member functions
37 // NOLINTBEGIN
39
40 MCAPI explicit ScriptItems(::ItemRegistryRef itemRegistry);
41
42 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
43 _getItemHandleForAlias(::HashedString const& aliasName) const;
44
45 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
46 _registerItemType(
47 ::std::unordered_map<
48 ::std::string,
51 ::std::string itemName,
52 bool allowAirBlockItem
53 );
54
55 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
56 _registerItemTypeAlias(
57 ::std::string itemName,
59 );
60
61 MCAPI void _registerItems(::Scripting::WeakLifetimeScope& scope, bool allowAirBlockItem);
62
63 MCAPI void _tryRegisterItemTypeAlias(::HashedString const& aliasName);
64
65 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
66 get(::Scripting::WeakLifetimeScope& scope, ::std::string const& itemName, bool allowAirBlockItem);
67
68 MCAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
69 getAll(::Scripting::WeakLifetimeScope& scope, bool allowAirBlockItem);
70
71 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
72 getOrAdd(::Scripting::WeakLifetimeScope& scope, ::std::string const& itemName, bool allowAirBlockItem);
73 // NOLINTEND
74
75public:
76 // static functions
77 // NOLINTBEGIN
78 MCAPI static ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
79 _getOrCreateItemTypeHandle(::Scripting::WeakLifetimeScope scope, ::std::string const& lookupName);
80
81 MCAPI static void bind(::Scripting::ModuleBindingBuilder& moduleBuilder, ::ItemRegistryRef itemRegistry);
82
83 MCAPI static ::std::unordered_map<::std::string, ::std::string>
84 generateItemPropertyNameToRawNameMap(::ItemRegistryRef itemRegistry, bool allowAirBlockItem);
85
86 MCAPI static ::std::vector<::std::string> generatetItemCooldownCategories(::ItemRegistryRef itemRegistry);
87
88 MCAPI static ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
89 getOrCreateItemTypeHandle(::Scripting::WeakLifetimeScope scope, ::std::string const& identifier);
90 // NOLINTEND
91
92public:
93 // constructor thunks
94 // NOLINTBEGIN
95 MCAPI void* $ctor(::ScriptModuleMinecraft::ScriptItems const&);
96
97 MCAPI void* $ctor(::ItemRegistryRef itemRegistry);
98 // NOLINTEND
99};
100
101} // namespace ScriptModuleMinecraft
Definition HashedString.h:5
Definition ItemRegistryRef.h:29
Definition ScriptItems.h:19
Definition ModuleBindingBuilder.h:30
Definition StrongTypedObjectHandle.h:8
Definition WeakLifetimeScope.h:12
Definition Alias.h:14