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
14class ItemStack;
15class Player;
16// clang-format on
17
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 // virtual functions
35 // NOLINTBEGIN
36 // vIndex: 0
37 virtual ~SimpleSparseContainer() /*override*/ = default;
38
39 // vIndex: 7
40 virtual ::ItemStack const& getItem(int slot) const /*override*/;
41
42 // vIndex: 12
43 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
44
45 // vIndex: 22
46 virtual void startOpen(::Player& player) /*override*/;
47
48 // vIndex: 23
49 virtual void stopOpen(::Player& player) /*override*/;
50
51 // vIndex: 20
52 virtual int getContainerSize() const /*override*/;
53
54 // vIndex: 21
55 virtual int getMaxStackSize() const /*override*/;
56
57 // vIndex: 0
58 virtual void containerContentChanged(int slot) /*override*/;
59
60 // vIndex: 2
61 virtual void serverInitItemStackIds(
62 int containerSlot,
63 int count,
64 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
65 ) /*override*/;
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
72 ::Container& backingContainer,
73 ::SparseContainerBackingSetType backingSetType,
74 ::std::unique_ptr<::ISparseContainerSetListener> sparseContainerSetListener,
75 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
76 );
77
78 MCAPI void _setBackingContainerSlot(int slot, ::ItemStack const& newItem);
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
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101 MCAPI ::ItemStack const& $getItem(int slot) const;
102
103 MCAPI void $setItem(int modelSlot, ::ItemStack const& item);
104
105 MCAPI void $startOpen(::Player& player);
106
107 MCAPI void $stopOpen(::Player& player);
108
109 MCAPI int $getContainerSize() const;
110
111 MCAPI int $getMaxStackSize() const;
112
113 MCAPI void $containerContentChanged(int slot);
114
115 MCFOLD void $serverInitItemStackIds(
116 int containerSlot,
117 int count,
118 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
119 );
120 // NOLINTEND
121
122public:
123 // vftables
124 // NOLINTBEGIN
125 MCAPI static void** $vftableForContainerContentChangeListener();
126
127 MCAPI static void** $vftableForContainer();
128 // NOLINTEND
129};
Definition ContainerContentChangeListener.h:5
Definition Container.h:30
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStack.h:25
Definition Player.h:119
Definition SimpleSparseContainer.h:18