LeviLamina
Loading...
Searching...
No Matches
SparseContainer.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/containers/ContainerEnumName.h"
9#include "mc/world/inventory/simulation/SparseContainerBackingSetType.h"
10
11// auto generated forward declare list
12// clang-format off
15class ItemStack;
16class ItemStackBase;
17class Player;
18// clang-format on
19
21public:
22 // SparseContainer inner types define
23 using ItemNetworkChangedCallback = ::std::function<void(int, ::ItemStack const&, ::ItemStack const&)>;
24
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<4, 4, ::SparseContainerBackingSetType const> mBackingSetType;
29 ::ll::TypedStorage<8, 8, ::Container&> mBackingContainer;
30 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::ItemStack>> mItems;
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ISparseContainerSetListener>> mNetManagerSetter;
32 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IPlayerContainerSetter>> mPlayerSetter;
33 ::ll::TypedStorage<
34 8,
35 64,
36 ::std::unordered_map<::ContainerEnumName, ::std::function<void(int, ::ItemStack const&, ::ItemStack const&)>>>
37 mItemNetworkChangedCallbacks;
38 ::ll::TypedStorage<
39 8,
40 64,
41 ::std::unordered_map<::ContainerEnumName, ::std::function<bool(int, ::ItemStackBase const&, int)>>>
42 mItemAllowedInSlotCallbacks;
43 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ContainerEnumName, ::std::function<bool(::ItemStackBase const&)>>>
44 mItemAllowedToAddCallbacks;
45 ::ll::TypedStorage<
46 8,
47 64,
48 ::std::unordered_map<::ContainerEnumName, ::std::function<int(int, ::ItemStackBase const&)>>>
49 mAvailableSetCountCallbacks;
50 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ContainerEnumName, ::std::function<bool(int)>>>
51 mValidSlotForContainerCallbacks;
52 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ContainerEnumName, ::std::function<bool(::ItemStackBase const&)>>>
53 mItemAllowedToRemoveCallbacks;
54 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ContainerEnumName, ::std::function<bool(::ItemStackBase const&)>>>
55 mItemAllowedInContainerCallbacks;
56 ::ll::TypedStorage<1, 1, bool const> mIsClientSide;
57 ::ll::TypedStorage<1, 1, bool const> mIsItemStackNetManagerEnabled;
58 // NOLINTEND
59
60public:
61 // virtual functions
62 // NOLINTBEGIN
63 // vIndex: 0
64 virtual ~SparseContainer() /*override*/ = default;
65
66 // vIndex: 7
67 virtual ::ItemStack const& getItem(int) const /*override*/;
68
69 // vIndex: 20
70 virtual int getContainerSize() const /*override*/;
71
72 // vIndex: 21
73 virtual int getMaxStackSize() const /*override*/;
74
75 // vIndex: 0
76 virtual void containerContentChanged(int) /*override*/;
77
78 // vIndex: 12
79 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
80
81 // vIndex: 2
82 virtual void serverInitItemStackIds(int, int, ::std::function<void(int, ::ItemStack const&)>) /*override*/;
83
84 // vIndex: 22
85 virtual void startOpen(::Player&) /*override*/;
86
87 // vIndex: 23
88 virtual void stopOpen(::Player& player) /*override*/;
89
90 // vIndex: 14
91 virtual void removeItem(int slot, int count) /*override*/;
92 // NOLINTEND
93
94public:
95 // member functions
96 // NOLINTBEGIN
97 MCAPI void _onItemNetworkChanged(int slot, ::ItemStack const& oldItem, ::ItemStack const& newItem);
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109
110 // NOLINTEND
111};
Definition ContainerContentChangeListener.h:5
Definition Container.h:30
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStackBase.h:35
Definition ItemStack.h:25
Definition Player.h:119
Definition SparseContainer.h:20