LeviLamina
Loading...
Searching...
No Matches
SimpleSparseContainer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Container.h"
7#include "mc/world/ContainerContentChangeListener.h"
8#include "mc/world/inventory/simulation/SparseContainerBackingSetType.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
15class ItemStack;
16// clang-format on
17
18class SimpleSparseContainer : public ::Container, public ::ContainerContentChangeListener {
19public:
20 // SimpleSparseContainer inner types define
21 using SparseContainerData = ::std::unordered_map<int, ::ItemStack>;
22
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 8, ::Container&> mBackingContainer;
27 ::ll::TypedStorage<4, 4, ::SparseContainerBackingSetType const> mBackingSetType;
28 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::ItemStack>> mItems;
29 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ISparseContainerSetListener>> mSparseContainerSetListener;
30 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IPlayerContainerSetter>> mPlayerSetter;
31 // NOLINTEND
32
33public:
34 // prevent constructor by default
35 SimpleSparseContainer& operator=(SimpleSparseContainer const&);
36 SimpleSparseContainer(SimpleSparseContainer const&);
37 SimpleSparseContainer();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~SimpleSparseContainer() /*override*/;
43
44 virtual ::ItemStack const& getItem(int slot) const /*override*/;
45
46 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
47
48 virtual void startOpen(::Actor& actor) /*override*/;
49
50 virtual void stopOpen(::Actor& actor) /*override*/;
51
52 virtual int getContainerSize() const /*override*/;
53
54 virtual int getMaxStackSize() const /*override*/;
55
56 virtual void containerContentChanged(int slot) /*override*/;
57
58 virtual void
59 serverInitItemStackIds(int onNetIdChanged, int, ::std::function<void(int, ::ItemStack const&)>) /*override*/;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI SimpleSparseContainer(
66 ::Container& backingContainer,
67 ::SparseContainerBackingSetType backingSetType,
68 ::std::unique_ptr<::ISparseContainerSetListener> sparseContainerSetListener,
69 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
70 );
71
72 MCFOLD void clearItem(int slot);
73
74 MCAPI void pushAllToBackingContainer();
75
76#ifdef LL_PLAT_C
77 MCAPI void setCreatedItem(int slot, ::ItemStack const& item);
78#endif
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84 MCAPI void* $ctor(
85 ::Container& backingContainer,
86 ::SparseContainerBackingSetType backingSetType,
87 ::std::unique_ptr<::ISparseContainerSetListener> sparseContainerSetListener,
88 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
89 );
90 // NOLINTEND
91
92public:
93 // destructor thunk
94 // NOLINTBEGIN
95 MCAPI void $dtor();
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101 MCAPI ::ItemStack const& $getItem(int slot) const;
102
103 MCAPI void $setItem(int slot, ::ItemStack const& item);
104
105 MCAPI void $startOpen(::Actor& actor);
106
107 MCAPI void $stopOpen(::Actor& actor);
108
109 MCAPI int $getContainerSize() const;
110
111 MCAPI int $getMaxStackSize() const;
112
113 MCAPI void $containerContentChanged(int slot);
114
115 MCFOLD void $serverInitItemStackIds(int onNetIdChanged, int, ::std::function<void(int, ::ItemStack const&)>);
116
117
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
123 MCAPI static void** $vftableForContainerContentChangeListener();
124
125 MCAPI static void** $vftableForContainer();
126 // NOLINTEND
127};
Definition Actor.h:125
Definition ContainerContentChangeListener.h:5
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStack.h:35