LeviLamina
Loading...
Searching...
No Matches
StorageItemComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Subscription.h"
7#include "mc/deps/game_refs/WeakRef.h"
8#include "mc/world/item/components/NetworkedItemComponent.h"
9#include "mc/world/level/storage/AllExperiments.h"
10
11// auto generated forward declare list
12// clang-format off
13class ComponentItem;
16class HashedString;
20class ItemDescriptor;
21class ItemStack;
22class ListTag;
23class Player;
24class SaveContext;
25class SemVersion;
27namespace SharedTypes::v1_21_60 { struct StorageItemComponent; }
28namespace cereal { struct ReflectionCtx; }
29// clang-format on
30
31class StorageItemComponent : public ::NetworkedItemComponent<::StorageItemComponent> {
32public:
33 // StorageItemComponent inner types declare
34 // clang-format off
36 // clang-format on
37
38 // StorageItemComponent inner types define
40
41public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<4, 4, int> mNumSlots;
45 ::ll::TypedStorage<1, 1, bool> mAllowNestedStorageItem;
46 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mBannedItems;
47 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mAllowedItems;
48 ::ll::TypedStorage<8, 16, ::WeakRef<::IDynamicContainerSerialization>> mContainerSerialization;
49 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryAccess>> mContainerRegistryAccess;
50 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryTracker>> mContainerRegistryTracker;
51 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
52 // NOLINTEND
53
54public:
55 // prevent constructor by default
56 StorageItemComponent& operator=(StorageItemComponent const&);
57 StorageItemComponent(StorageItemComponent const&);
58 StorageItemComponent();
59
60public:
61 // virtual functions
62 // NOLINTBEGIN
63 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69 MCAPI explicit StorageItemComponent(::SharedTypes::v1_21_60::StorageItemComponent const& component);
70
71 MCAPI ::std::shared_ptr<::DynamicContainerTracker>
72 createDynamicContainerTracker(::StorageItemComponent::ContainerRegistryWriteAccess writeAccess) const;
73
74 MCFOLD bool getAllowNestedStorageItem() const;
75
76 MCFOLD ::std::vector<::ItemDescriptor> const& getAllowedItems() const;
77
78 MCAPI ::std::shared_ptr<::FillingContainer>
79 getBackingContainer(::FullContainerName id, ::StorageItemComponent::ContainerRegistryWriteAccess writeAccess) const;
80
81 MCFOLD ::std::vector<::ItemDescriptor> const& getBannedItems() const;
82
83 MCFOLD int getNumSlot() const;
84
85 MCAPI ::StorageItemComponent& operator=(::StorageItemComponent&&);
86
87 MCAPI ::std::unique_ptr<::ListTag>
88 serializeStorageItem(::FullContainerName const& name, ::SaveContext const& saveContext) const;
89
90 MCAPI void setContainerRegistryHandlers(
94 );
95 // NOLINTEND
96
97public:
98 // static functions
99 // NOLINTBEGIN
100 MCAPI static void bindType(
102 ::std::vector<::AllExperiments> const& requiredToggles,
103 ::std::optional<::SemVersion> releasedMinFormatVersion
104 );
105
106 MCAPI static ::HashedString const& getIdentifier();
107
108 MCAPI static void use(bool& result, ::ItemStack const& item, ::Player& player);
109 // NOLINTEND
110
111public:
112 // constructor thunks
113 // NOLINTBEGIN
114 MCAPI void* $ctor(::SharedTypes::v1_21_60::StorageItemComponent const& component);
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120 MCAPI void $_initializeComponent(::ComponentItem& owner);
121
122
123 // NOLINTEND
124
125public:
126 // vftables
127 // NOLINTBEGIN
128 MCNAPI static void** $vftable();
129 // NOLINTEND
130};
Definition ComponentItem.h:55
Definition DynamicContainerTracker.h:21
Definition FillingContainer.h:18
Definition HashedString.h:5
Definition IContainerRegistryAccess.h:14
Definition IContainerRegistryTracker.h:15
Definition IDynamicContainerSerialization.h:12
Definition ItemDescriptor.h:25
Definition ItemStack.h:35
Definition ListTag.h:21
Definition NetworkedItemComponent.h:7
Definition Player.h:136
Definition SaveContext.h:5
Definition SemVersion.h:15
Definition StorageItemComponent.h:39
static MCAPI void ** $vftable()
Definition WeakRef.h:8
Definition FullContainerName.h:8
Definition StorageItemComponent.h:13
Definition ReflectionCtx.h:11
Definition ctx.h:5