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 // 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 modelSlot, ::ItemStack const& item) /*override*/;
50
51 // vIndex: 22
52 virtual void startOpen(::Player& player) /*override*/;
53
54 // vIndex: 23
55 virtual void stopOpen(::Player& player) /*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 MCNAPI void _setBackingContainerSlot(int slot, ::ItemStack const& newItem);
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCNAPI 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 MCNAPI ::ItemStack const& $getItem(int slot) const;
102
103 MCNAPI void $setItem(int modelSlot, ::ItemStack const& item);
104
105 MCNAPI void $startOpen(::Player& player);
106
107 MCNAPI void $stopOpen(::Player& player);
108
109 MCNAPI int $getContainerSize() const;
110
111 MCNAPI int $getMaxStackSize() const;
112
113 MCNAPI void $containerContentChanged(int slot);
114
116 int containerSlot,
117 int count,
118 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
119 );
120 // NOLINTEND
121
122public:
123 // vftables
124 // NOLINTBEGIN
126
127 MCNAPI 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
MCAPI void * $ctor(::Container &backingContainer, ::SparseContainerBackingSetType backingSetType, ::std::unique_ptr<::ISparseContainerSetListener > sparseContainerSetListener, ::std::unique_ptr<::IPlayerContainerSetter > playerSetter)
MCAPI int $getContainerSize() const
MCAPI void $stopOpen(::Player &player)
MCAPI void $setItem(int modelSlot, ::ItemStack const &item)
MCAPI int $getMaxStackSize() const
MCAPI void _setBackingContainerSlot(int slot, ::ItemStack const &newItem)
static MCAPI void ** $vftableForContainer()
MCAPI void $startOpen(::Player &player)
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI void $containerContentChanged(int slot)
static MCAPI void ** $vftableForContainerContentChangeListener()
MCAPI SimpleSparseContainer(::Container &backingContainer, ::SparseContainerBackingSetType backingSetType, ::std::unique_ptr<::ISparseContainerSetListener > sparseContainerSetListener, ::std::unique_ptr<::IPlayerContainerSetter > playerSetter)
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)