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 MCFOLD bool hasTrackingData() const;
62
63 MCAPI void mark(::ItemStack const& item);
64
65 MCAPI void sweep();
66
67 MCAPI ::std::optional<::ItemStack> tryTrackContainer(::ItemStack const& item);
68
69 MCAPI ~DynamicContainerTracker();
70 // NOLINTEND
71
72public:
73 // constructor thunks
74 // NOLINTBEGIN
75 MCAPI void*
77 // NOLINTEND
78
79public:
80 // destructor thunk
81 // NOLINTBEGIN
82 MCAPI void $dtor();
83 // NOLINTEND
84};
Definition DynamicContainerManager.h:18
Definition IContainerRegistryAccess.h:14
Definition IContainerRegistryTracker.h:15
Definition ItemStack.h:35
Definition StorageItemComponent.h:31
Definition StorageWeightLimitItemComponent.h:17
Definition WeakRef.h:8
Definition ContainerOwner.h:10
Definition PlayerContainerRefresher.h:13