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
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
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 // vIndex: 0
43 virtual ~SimpleSparseContainer() /*override*/ = default;
44
45 // vIndex: 7
46 virtual ::ItemStack const& getItem(int slot) const /*override*/;
47
48 // vIndex: 12
49 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
50
51 // vIndex: 22
52 virtual void startOpen(::Actor& actor) /*override*/;
53
54 // vIndex: 23
55 virtual void stopOpen(::Actor& actor) /*override*/;
56
57 // vIndex: 20
58 virtual int getContainerSize() const /*override*/;
59
60 // vIndex: 21
61 virtual int getMaxStackSize() const /*override*/;
62
63 // vIndex: 0
64 virtual void containerContentChanged(int slot) /*override*/;
65
66 // vIndex: 2
67 virtual void serverInitItemStackIds(
68 int containerSlot,
69 int count,
70 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
71 ) /*override*/;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
78 ::Container& backingContainer,
79 ::SparseContainerBackingSetType backingSetType,
80 ::std::unique_ptr<::ISparseContainerSetListener> sparseContainerSetListener,
81 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
82 );
83
84 MCAPI void _setBackingContainerSlot(int slot, ::ItemStack const& newItem);
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCAPI void* $ctor(
91 ::Container& backingContainer,
92 ::SparseContainerBackingSetType backingSetType,
93 ::std::unique_ptr<::ISparseContainerSetListener> sparseContainerSetListener,
94 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
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 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(
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 Actor.h:102
Definition ContainerContentChangeListener.h:5
Definition Container.h:31
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStack.h:23
Definition SimpleSparseContainer.h:18