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 MCNAPI explicit ScriptItems(::ItemRegistryRef itemRegistry);
41
42 MCNAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
43 _getItemHandleForAlias(::HashedString const& aliasName) const;
44
45 MCNAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
47 ::std::unordered_map<
48 ::std::string,
51 ::std::string itemName,
52 bool allowAirBlockItem
53 );
54
55 MCNAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
57 ::std::string itemName,
59 );
60
61 MCNAPI void _registerItems(::Scripting::WeakLifetimeScope& scope, bool allowAirBlockItem);
62
63 MCNAPI void _tryRegisterItemTypeAlias(::HashedString const& aliasName);
64
65 MCNAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
66 get(::Scripting::WeakLifetimeScope& scope, ::std::string const& itemName, bool allowAirBlockItem);
67
68 MCNAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
69 getAll(::Scripting::WeakLifetimeScope& scope, bool allowAirBlockItem);
70
71 MCNAPI ::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 MCNAPI static ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>>
79 _getOrCreateItemTypeHandle(::Scripting::WeakLifetimeScope scope, ::std::string const& lookupName);
80
81 MCNAPI static void bind(::Scripting::ModuleBindingBuilder& moduleBuilder, ::ItemRegistryRef itemRegistry);
82
83 MCNAPI static ::std::unordered_map<::std::string, ::std::string>
84 generateItemPropertyNameToRawNameMap(::ItemRegistryRef itemRegistry, bool allowAirBlockItem);
85
86 MCNAPI static ::std::vector<::std::string> generatetItemCooldownCategories(::ItemRegistryRef itemRegistry);
87
88 MCNAPI 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
96
97 MCNAPI void* $ctor(::ItemRegistryRef itemRegistry);
98 // NOLINTEND
99};
100
101} // namespace ScriptModuleMinecraft
Definition HashedString.h:5
Definition ItemRegistryRef.h:31
Definition ScriptItems.h:19
static MCAPI ::std::vector<::std::string > generatetItemCooldownCategories(::ItemRegistryRef itemRegistry)
MCAPI void * $ctor(::ScriptModuleMinecraft::ScriptItems const &)
static MCAPI void bind(::Scripting::ModuleBindingBuilder &moduleBuilder, ::ItemRegistryRef itemRegistry)
MCAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > getAll(::Scripting::WeakLifetimeScope &scope, bool allowAirBlockItem)
MCAPI void _tryRegisterItemTypeAlias(::HashedString const &aliasName)
static MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > getOrCreateItemTypeHandle(::Scripting::WeakLifetimeScope scope, ::std::string const &identifier)
MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > _registerItemType(::std::unordered_map< ::std::string, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > &registry, ::Scripting::WeakLifetimeScope scope, ::std::string itemName, bool allowAirBlockItem)
MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > getOrAdd(::Scripting::WeakLifetimeScope &scope, ::std::string const &itemName, bool allowAirBlockItem)
MCAPI void * $ctor(::ItemRegistryRef itemRegistry)
MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > _registerItemTypeAlias(::std::string itemName, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > itemHandle)
MCAPI void _registerItems(::Scripting::WeakLifetimeScope &scope, bool allowAirBlockItem)
MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > _getItemHandleForAlias(::HashedString const &aliasName) const
static MCAPI ::std::unordered_map<::std::string, ::std::string > generateItemPropertyNameToRawNameMap(::ItemRegistryRef itemRegistry, bool allowAirBlockItem)
MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > get(::Scripting::WeakLifetimeScope &scope, ::std::string const &itemName, bool allowAirBlockItem)
MCAPI ScriptItems(::ScriptModuleMinecraft::ScriptItems const &)
static MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > > _getOrCreateItemTypeHandle(::Scripting::WeakLifetimeScope scope, ::std::string const &lookupName)
MCAPI ScriptItems(::ItemRegistryRef itemRegistry)
Definition ModuleBindingBuilder.h:30
Definition StrongTypedObjectHandle.h:8
Definition WeakLifetimeScope.h:12
Definition Alias.h:14