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;
15class HashedString;
19class ItemDescriptor;
20class ItemStack;
21class ListTag;
22class Player;
23class SaveContext;
24class SemVersion;
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
57
58public:
59 // virtual functions
60 // NOLINTBEGIN
61 // vIndex: 7
62 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
63
64 // vIndex: 0
65 virtual ~StorageItemComponent() /*override*/;
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
71 MCAPI ::std::shared_ptr<::FillingContainer>
72 getBackingContainer(::FullContainerName id, ::StorageItemComponent::ContainerRegistryWriteAccess writeAccess) const;
73
74 MCAPI ::StorageItemComponent& operator=(::StorageItemComponent&&);
75
76 MCAPI ::std::unique_ptr<::ListTag>
77 serializeStorageItem(::FullContainerName const& name, ::SaveContext const& saveContext) const;
78
79 MCAPI void setContainerRegistryHandlers(
83 );
84 // NOLINTEND
85
86public:
87 // static functions
88 // NOLINTBEGIN
89 MCAPI static void bindType(
91 ::std::vector<::AllExperiments> const& requiredToggles,
92 ::std::optional<::SemVersion> releasedMinFormatVersion
93 );
94
95 MCAPI static ::HashedString const& getIdentifier();
96
97 MCAPI static void use(bool& result, ::ItemStack const& item, ::Player& player);
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI void $_initializeComponent(::ComponentItem& owner);
110 // NOLINTEND
111
112public:
113 // vftables
114 // NOLINTBEGIN
115 MCNAPI static void** $vftable();
116 // NOLINTEND
117};
Definition ComponentItem.h:53
Definition FillingContainer.h:17
Definition HashedString.h:5
Definition IContainerRegistryAccess.h:14
Definition IContainerRegistryTracker.h:15
Definition IDynamicContainerSerialization.h:12
Definition ItemDescriptor.h:22
Definition ItemStack.h:23
Definition ListTag.h:12
Definition NetworkedItemComponent.h:7
Definition Player.h:123
Definition SaveContext.h:5
Definition SemVersion.h:16
Definition StorageItemComponent.h:37
Definition StorageItemComponent.h:29
static MCAPI void ** $vftable()
Definition WeakRef.h:8
Definition FullContainerName.h:8
Definition ReflectionCtx.h:11
Definition ctx.h:5