LeviLamina
Loading...
Searching...
No Matches
DynamicContainerTracker.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/world/containers/FullContainerName.h"
8
9// auto generated forward declare list
10// clang-format off
14class ItemStack;
17struct ContainerOwner;
19// clang-format on
20
21class DynamicContainerTracker {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryAccess>> mContainerRegistryAccess;
26 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryTracker>> mContainerRegistryManager;
27 ::ll::TypedStorage<8, 64, ::std::unordered_map<::FullContainerName, ::std::unique_ptr<::DynamicContainerManager>>>
28 mTrackedContainers;
29 ::ll::TypedStorage<8, 64, ::std::unordered_set<::FullContainerName>> mMarkedReachable;
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 DynamicContainerTracker();
35
36public:
37 // member functions
38 // NOLINTBEGIN
39 MCAPI DynamicContainerTracker(
42 );
43
44 MCAPI ::std::optional<::ItemStack> _initializeStorageItem(
45 ::ItemStack const& item,
46 ::StorageItemComponent* storageItemComponent,
47 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent
48 );
49
50 MCAPI void _markAux(::ItemStack const& item, int depth);
51
52 MCAPI void _retrackRecursiveAux(::ItemStack const& item, int depth);
53
54 MCAPI ::std::pair<::FullContainerName, ::ItemStack> _tryInitID(::ItemStack const& item) const;
55
56 MCAPI void
57 broadcastChanges(::PlayerContainerRefresher& refresher, ::std::function<void()> contentsChangedCallback) const;
58
59 MCAPI void giveContainerLifetimes(::ContainerOwner& containerOwner) const;
60
61 MCAPI ::std::optional<::ItemStack> tryTrackContainer(::ItemStack const& item);
62 // NOLINTEND
63
64public:
65 // constructor thunks
66 // NOLINTBEGIN
67 MCAPI void*
69 // NOLINTEND
70};
Definition DynamicContainerManager.h:17
Definition IContainerRegistryAccess.h:14
Definition IContainerRegistryTracker.h:15
Definition ItemStack.h:26
Definition StorageItemComponent.h:29
Definition StorageWeightLimitItemComponent.h:16
Definition WeakRef.h:8
Definition ContainerOwner.h:10
Definition PlayerContainerRefresher.h:13