LeviLamina
Loading...
Searching...
No Matches
ContainerRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/containers/IContainerRegistryAccess.h"
7#include "mc/world/containers/IContainerRegistryTracker.h"
8#include "mc/world/containers/IDynamicContainerSerialization.h"
9
10// auto generated forward declare list
11// clang-format off
14class ItemStack;
15class ListTag;
16class Packet;
17class SaveContext;
23// clang-format on
24
28public:
29 // member variables
30 // NOLINTBEGIN
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
40 ContainerRegistry& operator=(ContainerRegistry const&);
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 // vIndex: 2
48 virtual ~ContainerRegistry() /*override*/ = default;
49
50 // vIndex: 0
51 virtual ::std::unique_ptr<::ListTag>
52 serializeContainerContent(::FullContainerName const& name, ::SaveContext const& saveContext) /*override*/;
53
54 // vIndex: 1
55 virtual ::std::optional<int> getDynamicContainerWeight(::FullContainerName const& name) /*override*/;
56
57 // vIndex: 0
58 virtual ::std::shared_ptr<::StorageItemContainerModel> getModel(::FullContainerName const& name) /*override*/;
59
60 // vIndex: 1
61 virtual ::std::shared_ptr<::FillingContainer> getBackingContainer(::FullContainerName const& name) /*override*/;
62
63 // vIndex: 2
64 virtual void tryCreateEntry(
65 ::StorageItemComponent* storageItemComponent,
66 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent,
67 ::FullContainerName const& name
68 ) /*override*/;
69
70 // vIndex: 0
71 virtual ::std::unique_ptr<::DynamicContainerManager> createContainerManager(
72 ::FullContainerName const& id,
73 ::ItemStack const& storageItem,
74 ::StorageItemComponent* storageItemComponent,
75 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent
76 ) /*override*/;
77
78 // vIndex: 1
79 virtual uint generateNewID() /*override*/;
80
81 // vIndex: 2
82 virtual void tryLoadSavedStorageItem(::ListTag const& contentData, ::FullContainerName const& name) /*override*/;
83
84 // vIndex: 3
85 virtual void setExpired(::std::vector<::FullContainerName> const& removedContainers) /*override*/;
86
87 // vIndex: 4
88 virtual uint64 getSize() /*override*/;
89 // NOLINTEND
90
91public:
92 // member functions
93 // NOLINTBEGIN
94 MCAPI explicit ContainerRegistry(bool isClientSide);
95
96 MCAPI ::DynamicTrackedContainer& _getOrCreate(
97 ::FullContainerName const& id,
98 ::StorageItemComponent* storageItemComponent,
99 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent
100 );
101
102 MCAPI void _serverCleanUp(::std::function<void(::Packet&)> broadcastPacketFunction);
103
104 MCAPI void tick(::std::function<void(::Packet&)> broadcastPacketFunction);
105 // NOLINTEND
106
107public:
108 // static functions
109 // NOLINTBEGIN
110 MCAPI static void sendCleanupPackets(
111 ::std::function<void(::Packet&)> const& broadcastPacketFunction,
112 ::std::vector<::FullContainerName> const& removedContainers
113 );
114 // NOLINTEND
115
116public:
117 // constructor thunks
118 // NOLINTBEGIN
119 MCAPI void* $ctor(bool isClientSide);
120 // NOLINTEND
121
122public:
123 // destructor thunk
124 // NOLINTBEGIN
125
126 // NOLINTEND
127
128public:
129 // virtual function thunks
130 // NOLINTBEGIN
131 MCAPI ::std::unique_ptr<::ListTag>
132 $serializeContainerContent(::FullContainerName const& name, ::SaveContext const& saveContext);
133
134 MCAPI ::std::optional<int> $getDynamicContainerWeight(::FullContainerName const& name);
135
136 MCAPI ::std::shared_ptr<::StorageItemContainerModel> $getModel(::FullContainerName const& name);
137
138 MCAPI ::std::shared_ptr<::FillingContainer> $getBackingContainer(::FullContainerName const& name);
139
140 MCAPI void $tryCreateEntry(
141 ::StorageItemComponent* storageItemComponent,
142 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent,
143 ::FullContainerName const& name
144 );
145
146 MCAPI ::std::unique_ptr<::DynamicContainerManager> $createContainerManager(
147 ::FullContainerName const& id,
148 ::ItemStack const& storageItem,
149 ::StorageItemComponent* storageItemComponent,
150 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent
151 );
152
153 MCAPI uint $generateNewID();
154
155 MCAPI void $tryLoadSavedStorageItem(::ListTag const& contentData, ::FullContainerName const& name);
156
157 MCAPI void $setExpired(::std::vector<::FullContainerName> const& removedContainers);
158
159 MCFOLD uint64 $getSize();
160 // NOLINTEND
161
162public:
163 // vftables
164 // NOLINTBEGIN
165 MCAPI static void** $vftableForIDynamicContainerSerialization();
166
167 MCAPI static void** $vftableForIContainerRegistryTracker();
168
169 MCAPI static void** $vftableForIContainerRegistryAccess();
170 // NOLINTEND
171};
Definition ContainerRegistry.h:27
Definition DynamicContainerManager.h:14
Definition FillingContainer.h:16
Definition IContainerRegistryAccess.h:14
Definition IContainerRegistryTracker.h:15
Definition IDynamicContainerSerialization.h:12
Definition ItemStack.h:25
Definition ListTag.h:12
Definition Packet.h:26
Definition SaveContext.h:5
Definition StorageItemComponent.h:25
Definition StorageItemContainerModel.h:18
Definition StorageWeightLimitItemComponent.h:16
Definition DynamicTrackedContainer.h:11
Definition FullContainerName.h:8
Definition Alias.h:14