Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
CreativeItemRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
7#include "mc/deps/shared_types/item/CreativeItemCategory.h"
8#include "mc/platform/brstd/flat_map.h"
9#include "mc/platform/brstd/function_ref.h"
10#include "mc/world/inventory/network/TypedServerNetId.h"
11
12// auto generated forward declare list
13// clang-format off
14class BlockPalette;
19class ItemInstance;
21// clang-format on
22
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 24, ::std::vector<::CreativeItemEntry>> mCreativeItems;
28 ::ll::TypedStorage<8, 24, ::std::vector<::CreativeGroupInfo>> mCreativeGroups;
29 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SharedTypes::CreativeItemCategory, ::CreativeItemGroupCategory>>
30 mCreativeGroupCategories;
31 ::ll::TypedStorage<8, 64, ::std::unordered_map<::CreativeItemNetId, uint64>> mCreativeNetIdIndex;
32 // NOLINTEND
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual ~CreativeItemRegistry() /*override*/ = default;
38 // NOLINTEND
39
40public:
41 // member functions
42 // NOLINTBEGIN
43#ifdef LL_PLAT_C
44 MCNAPI CreativeItemRegistry();
45#endif
46
47 MCNAPI ::brstd::flat_map<
48 ::SharedTypes::CreativeItemCategory,
49 ::gsl::not_null<::CreativeItemGroupCategory*>,
50 ::std::less<::SharedTypes::CreativeItemCategory>,
51 ::std::vector<::SharedTypes::CreativeItemCategory>,
52 ::std::vector<::gsl::not_null<::CreativeItemGroupCategory*>>> createCategories();
53
54#ifdef LL_PLAT_C
55 MCNAPI void forEachCreativeItemInstance(::brstd::function_ref<bool(::ItemInstance const&)> func) const;
56
57 MCNAPI void initializeFromCreativeContentPacket(
58 ::CreativeContentPacket const& creativeContentPacket,
59 ::BlockPalette const& blockPalette
60 );
61#endif
62
63#ifdef LL_PLAT_S
64 MCNAPI ::CreativeItemEntry* newItemEntry(::CreativeItemNetId const& creativeNetId, ::ItemInstance const& item);
65#endif
66
67#ifdef LL_PLAT_C
68 MCNAPI void updateNetIdMap();
69#endif
70 // NOLINTEND
71
72public:
73 // constructor thunks
74 // NOLINTBEGIN
75#ifdef LL_PLAT_C
76 MCNAPI void* $ctor();
77#endif
78 // NOLINTEND
79
80public:
81 // vftables
82 // NOLINTBEGIN
83 MCNAPI static void** $vftable();
84 // NOLINTEND
85};
Definition EnableNonOwnerReferences.h:7
Definition BlockPalette.h:18
Definition CreativeContentPacket.h:19
Definition CreativeGroupInfo.h:17
Definition CreativeItemEntry.h:16
Definition CreativeItemGroupCategory.h:17
Definition CreativeItemRegistry.h:23
static MCAPI void ** $vftable()
MCAPI ::brstd::flat_map< ::SharedTypes::CreativeItemCategory, ::gsl::not_null<::CreativeItemGroupCategory * >, ::std::less<::SharedTypes::CreativeItemCategory >, ::std::vector<::SharedTypes::CreativeItemCategory >, ::std::vector<::gsl::not_null<::CreativeItemGroupCategory * > > > createCategories()
Definition ItemInstance.h:15
Definition function_ref.h:60
Definition CreativeItemNetIdTag.h:5