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
14class HashedString;
18class ItemDescriptor;
19class ItemStack;
20class ListTag;
21class Player;
22class SaveContext;
23class SemVersion;
25namespace cereal { struct ReflectionCtx; }
26// clang-format on
27
28class StorageItemComponent : public ::NetworkedItemComponent<::StorageItemComponent> {
29public:
30 // StorageItemComponent inner types declare
31 // clang-format off
33 // clang-format on
34
35 // StorageItemComponent inner types define
37
38public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<4, 4, int> mNumSlots;
42 ::ll::TypedStorage<1, 1, bool> mAllowNestedStorageItem;
43 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mBannedItems;
44 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mAllowedItems;
45 ::ll::TypedStorage<8, 16, ::WeakRef<::IDynamicContainerSerialization>> mContainerSerialization;
46 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryAccess>> mContainerRegistryAccess;
47 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryTracker>> mContainerRegistryTracker;
48 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
49 // NOLINTEND
50
51public:
52 // prevent constructor by default
56
57public:
58 // virtual functions
59 // NOLINTBEGIN
60 // vIndex: 7
61 virtual void _initializeComponent() /*override*/;
62
63 // vIndex: 0
64 virtual ~StorageItemComponent() /*override*/;
65 // NOLINTEND
66
67public:
68 // member functions
69 // NOLINTBEGIN
70 MCAPI ::std::shared_ptr<::FillingContainer>
71 getBackingContainer(::FullContainerName id, ::StorageItemComponent::ContainerRegistryWriteAccess writeAccess) const;
72
73 MCAPI ::StorageItemComponent& operator=(::StorageItemComponent&&);
74
75 MCAPI ::std::unique_ptr<::ListTag>
76 serializeStorageItem(::FullContainerName const& name, ::SaveContext const& saveContext) const;
77
78 MCAPI void setContainerRegistryHandlers(
82 );
83 // NOLINTEND
84
85public:
86 // static functions
87 // NOLINTBEGIN
88 MCAPI static void bindType(
90 ::std::vector<::AllExperiments> const& requiredToggles,
91 ::std::optional<::SemVersion> releasedMinFormatVersion
92 );
93
94 MCAPI static ::HashedString const& getIdentifier();
95
96 MCAPI static void use(bool& result, ::ItemStack const& item, ::Player& player);
97 // NOLINTEND
98
99public:
100 // destructor thunk
101 // NOLINTBEGIN
102 MCAPI void $dtor();
103 // NOLINTEND
104
105public:
106 // virtual function thunks
107 // NOLINTBEGIN
108 MCAPI void $_initializeComponent();
109 // NOLINTEND
110
111public:
112 // vftables
113 // NOLINTBEGIN
114 MCNAPI static void** $vftable();
115 // NOLINTEND
116};
Definition FillingContainer.h:16
Definition HashedString.h:5
Definition IContainerRegistryAccess.h:14
Definition IContainerRegistryTracker.h:15
Definition IDynamicContainerSerialization.h:12
Definition ItemDescriptor.h:22
Definition ItemStack.h:25
Definition ListTag.h:12
Definition NetworkedItemComponent.h:7
Definition Player.h:120
Definition SaveContext.h:5
Definition SemVersion.h:16
Definition StorageItemComponent.h:36
Definition StorageItemComponent.h:28
static MCAPI void ** $vftable()
Definition WeakRef.h:8
Definition FullContainerName.h:8
Definition ReflectionCtx.h:11
Definition ctx.h:5