LeviLamina
Loading...
Searching...
No Matches
FillingContainer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Container.h"
7
8// auto generated forward declare list
9// clang-format off
10class ItemStack;
11class ListTag;
12class Player;
13class SaveContext;
14// clang-format on
15
17public:
18 // FillingContainer inner types define
19 using ItemList = ::std::vector<::ItemStack>;
20
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
25 ::ll::TypedStorage<8, 8, ::Player*> mPlayer;
26 // NOLINTEND
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 // vIndex: 0
32 virtual ~FillingContainer() /*override*/;
33
34 // vIndex: 41
35 virtual int removeResource(::ItemStack const& item, bool requireExactAux, bool requireExactData, int maxCount);
36
37 // vIndex: 42
38 virtual void swapSlots(int from, int to);
39
40 // vIndex: 43
41 virtual bool add(::ItemStack& item);
42
43 // vIndex: 44
44 virtual bool canAdd(::ItemStack const& item) const;
45
46 // vIndex: 14
47 virtual void removeItem(int slot, int count) /*override*/;
48
49 // vIndex: 45
50 virtual void clearSlot(int slot);
51
52 // vIndex: 46
53 virtual int clearInventory(int resizeTo);
54
55 // vIndex: 47
56 virtual ::std::unique_ptr<::ListTag> saveToTag(::SaveContext const& saveContext) const;
57
58 // vIndex: 48
59 virtual void loadFromTag(::ListTag const& inventoryList);
60
61 // vIndex: 12
62 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
63
64 // vIndex: 13
65 virtual void setItemWithForceBalance(int slot, ::ItemStack const& item, bool forceBalanced) /*override*/;
66
67 // vIndex: 7
68 virtual ::ItemStack const& getItem(int slot) const /*override*/;
69
70 // vIndex: 21
71 virtual int getMaxStackSize() const /*override*/;
72
73 // vIndex: 20
74 virtual int getContainerSize() const /*override*/;
75
76 // vIndex: 22
77 virtual void startOpen(::Player&) /*override*/;
78
79 // vIndex: 2
80 virtual void serverInitItemStackIds(
81 int containerSlot,
82 int count,
83 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
84 ) /*override*/;
85
86 // vIndex: 49
87 virtual void _trySetInSlot(::ItemStack& item, int const& slot, int const& inventorySize, int& backCompatOffset);
88 // NOLINTEND
89
90public:
91 // member functions
92 // NOLINTBEGIN
93 MCAPI int _addResource(::ItemStack const& item);
94
95 MCAPI int _getFreeSlot() const;
96
97 MCAPI int _getSlotWithRemainingSpace(::ItemStack const& newItem) const;
98
99 MCAPI bool _isCreative() const;
100
101 MCAPI void _release(int slot);
102
103 MCAPI int getSlotWithItem(::ItemStack const& item, bool checkAux, bool checkData) const;
104
105 MCAPI bool removeResource(int type);
106 // NOLINTEND
107
108public:
109 // destructor thunk
110 // NOLINTBEGIN
111 MCAPI void $dtor();
112 // NOLINTEND
113
114public:
115 // virtual function thunks
116 // NOLINTBEGIN
117 MCAPI int $removeResource(::ItemStack const& item, bool requireExactAux, bool requireExactData, int maxCount);
118
119 MCAPI void $swapSlots(int from, int to);
120
121 MCAPI bool $add(::ItemStack& item);
122
123 MCAPI bool $canAdd(::ItemStack const& item) const;
124
125 MCAPI void $removeItem(int slot, int count);
126
127 MCAPI void $clearSlot(int slot);
128
129 MCAPI int $clearInventory(int resizeTo);
130
131 MCAPI ::std::unique_ptr<::ListTag> $saveToTag(::SaveContext const& saveContext) const;
132
133 MCAPI void $loadFromTag(::ListTag const& inventoryList);
134
135 MCFOLD void $setItem(int modelSlot, ::ItemStack const& item);
136
137 MCAPI void $setItemWithForceBalance(int slot, ::ItemStack const& item, bool forceBalanced);
138
139 MCAPI ::ItemStack const& $getItem(int slot) const;
140
141 MCFOLD int $getMaxStackSize() const;
142
143 MCFOLD int $getContainerSize() const;
144
145 MCFOLD void $startOpen(::Player&);
146
147 MCFOLD void $serverInitItemStackIds(
148 int containerSlot,
149 int count,
150 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
151 );
152
153 MCAPI void $_trySetInSlot(::ItemStack& item, int const& slot, int const& inventorySize, int& backCompatOffset);
154 // NOLINTEND
155
156public:
157 // vftables
158 // NOLINTBEGIN
159 MCAPI static void** $vftable();
160 // NOLINTEND
161};
Definition Container.h:30
Definition FillingContainer.h:16
Definition ItemStack.h:25
Definition ListTag.h:12
Definition Player.h:119
Definition SaveContext.h:5