Skip to content
LeviMC
English
AutoLightDark
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/HandSlot.h"
9#include "mc/world/item/components/NetworkedItemComponent.h"
10#include "mc/world/level/storage/AllExperiments.h"
11
12// auto generated forward declare list
13// clang-format off
14class ComponentItem;
16class HashedString;
20class ItemDescriptor;
21class ItemStack;
22class Player;
23class SemVersion;
25struct ItemOnUseResult;
26namespace cereal { struct ReflectionCtx; }
27// clang-format on
28
29class StorageItemComponent : public ::NetworkedItemComponent<::StorageItemComponent> {
30public:
31 // StorageItemComponent inner types declare
32 // clang-format off
34 // clang-format on
35
36 // StorageItemComponent inner types define
38
39public:
40 // member variables
41 // NOLINTBEGIN
42 ::ll::TypedStorage<4, 4, int> mNumSlots;
43 ::ll::TypedStorage<1, 1, bool> mAllowNestedStorageItem;
44 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mBannedItems;
45 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mAllowedItems;
46 ::ll::TypedStorage<8, 16, ::WeakRef<::IDynamicContainerSerialization>> mContainerSerialization;
47 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryAccess>> mContainerRegistryAccess;
48 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryTracker>> mContainerRegistryTracker;
49 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
50 // NOLINTEND
51
52public:
53 // prevent constructor by default
54 StorageItemComponent& operator=(StorageItemComponent const&);
55 StorageItemComponent(StorageItemComponent const&);
56 StorageItemComponent();
57
58public:
59 // virtual functions
60 // NOLINTBEGIN
61 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
62
63 virtual ~StorageItemComponent() /*override*/;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69#ifdef LL_PLAT_S
70 MCNAPI ::std::shared_ptr<::FillingContainer>
71 getBackingContainer(::FullContainerName id, ::StorageItemComponent::ContainerRegistryWriteAccess writeAccess) const;
72#endif
73
74 MCNAPI ::StorageItemComponent& operator=(::StorageItemComponent&&);
75
80 );
81 // NOLINTEND
82
83public:
84 // static functions
85 // NOLINTBEGIN
86 MCNAPI static void bindType(
88 ::std::vector<::AllExperiments> const& requiredToggles,
89 ::std::optional<::SemVersion> releasedMinFormatVersion
90 );
91
92#ifdef LL_PLAT_C
93 MCNAPI static ::HashedString const& getIdentifier();
94#endif
95
96 MCNAPI static void use(::ItemOnUseResult& result, ::ItemStack const& item, ::Player& player, ::HandSlot handSlot);
97 // NOLINTEND
98
99public:
100 // destructor thunk
101 // NOLINTBEGIN
102 MCNAPI void $dtor();
103 // NOLINTEND
104
105public:
106 // virtual function thunks
107 // NOLINTBEGIN
109
110
111 // NOLINTEND
112
113public:
114 // vftables
115 // NOLINTBEGIN
116 MCNAPI static void** $vftable();
117 // NOLINTEND
118};
Definition ComponentItem.h:52
Definition FillingContainer.h:17
Definition HashedString.h:5
Definition IContainerRegistryAccess.h:14
Definition IContainerRegistryTracker.h:15
Definition IDynamicContainerSerialization.h:12
Definition ItemDescriptor.h:24
Definition ItemStack.h:26
Definition NetworkedItemComponent.h:7
Definition Player.h:131
Definition SemVersion.h:15
Definition StorageItemComponent.h:37
static MCAPI void bindType(::cereal::ReflectionCtx &ctx, ::std::vector<::AllExperiments > const &requiredToggles, ::std::optional<::SemVersion > releasedMinFormatVersion)
static MCAPI void ** $vftable()
MCAPI void $_initializeComponent(::ComponentItem &owner)
static MCAPI void use(::ItemOnUseResult &result, ::ItemStack const &item, ::Player &player, ::HandSlot handSlot)
MCAPI::StorageItemComponent & operator=(::StorageItemComponent &&)
MCAPI void setContainerRegistryHandlers(::WeakRef<::IDynamicContainerSerialization > containerSerialization, ::WeakRef<::IContainerRegistryAccess > containerAccess, ::WeakRef<::IContainerRegistryTracker > containerTracker)
MCAPI void $dtor()
Definition WeakRef.h:8
Definition FullContainerName.h:8
Definition ItemOnUseResult.h:5
Definition ReflectionCtx.h:11
Definition ctx.h:5