Skip to content
LeviMC
English
AutoLightDark
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 Actor;
11class ItemStack;
12class ListTag;
13class Player;
14class SaveContext;
15// clang-format on
16
17class FillingContainer : public ::Container {
18public:
19 // FillingContainer inner types define
20 using ItemList = ::std::vector<::ItemStack>;
21
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
26 ::ll::TypedStorage<8, 8, ::Player*> mPlayer;
27 // NOLINTEND
28
29public:
30 // virtual functions
31 // NOLINTBEGIN
32 virtual ~FillingContainer() /*override*/;
33
34 virtual int removeResource(::ItemStack const& item, bool requireExactAux, bool requireExactData, int maxCount);
35
36 virtual void swapSlots(int from, int to);
37
38 virtual bool add(::ItemStack& item);
39
40 virtual bool canAdd(::ItemStack const& item) const;
41
42 virtual void removeItem(int slot, int count) /*override*/;
43
44 virtual void clearSlot(int slot);
45
46 virtual int clearInventory(int resizeTo);
47
48 virtual ::std::unique_ptr<::ListTag> saveToTag(::SaveContext const& saveContext) const;
49
50 virtual void loadFromTag(::ListTag const& inventoryList);
51
52 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
53
54 virtual void setItemWithForceBalance(int slot, ::ItemStack const& item, bool forceBalanced) /*override*/;
55
56 virtual ::ItemStack const& getItem(int slot) const /*override*/;
57
58 virtual int getMaxStackSize() const /*override*/;
59
60 virtual int getContainerSize() const /*override*/;
61
62 virtual void startOpen(::Actor& actor) /*override*/;
63
64 virtual void serverInitItemStackIds(
65 int containerSlot,
66 int count,
67 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
68 ) /*override*/;
69
70 virtual void _trySetInSlot(::ItemStack& item, int const& slot, int const& inventorySize, int& backCompatOffset);
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCNAPI int _addResource(::ItemStack const& item);
77
78 MCNAPI int _getSlotWithRemainingSpace(::ItemStack const& newItem) const;
79
80 MCAPI int getSlotWithItem(::ItemStack const& item, bool checkAux, bool checkData) const;
81
82 MCNAPI bool removeResource(int type);
83 // NOLINTEND
84
85public:
86 // destructor thunk
87 // NOLINTBEGIN
88 MCNAPI void $dtor();
89 // NOLINTEND
90
91public:
92 // virtual function thunks
93 // NOLINTBEGIN
94 MCAPI int $removeResource(::ItemStack const& item, bool requireExactAux, bool requireExactData, int maxCount);
95
96 MCAPI void $swapSlots(int from, int to);
97
98 MCAPI bool $add(::ItemStack& item);
99
100 MCNAPI bool $canAdd(::ItemStack const& item) const;
101
102 MCAPI void $removeItem(int slot, int count);
103
104 MCAPI void $clearSlot(int slot);
105
106 MCAPI int $clearInventory(int resizeTo);
107
108 MCNAPI ::std::unique_ptr<::ListTag> $saveToTag(::SaveContext const& saveContext) const;
109
110 MCAPI void $loadFromTag(::ListTag const& inventoryList);
111
112 MCNAPI void $setItem(int slot, ::ItemStack const& item);
113
114 MCAPI void $setItemWithForceBalance(int slot, ::ItemStack const& item, bool forceBalanced);
115
116 MCNAPI ::ItemStack const& $getItem(int slot) const;
117
118 MCNAPI int $getMaxStackSize() const;
119
120 MCNAPI int $getContainerSize() const;
121
122 MCNAPI void $startOpen(::Actor& actor);
123
125 int containerSlot,
126 int count,
127 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
128 );
129
130 MCNAPI void $_trySetInSlot(::ItemStack& item, int const& slot, int const& inventorySize, int& backCompatOffset);
131
132
133 // NOLINTEND
134
135public:
136 // vftables
137 // NOLINTBEGIN
138 MCNAPI static void** $vftable();
139 // NOLINTEND
140};
Definition Actor.h:116
Definition FillingContainer.h:17
MCAPI bool $canAdd(::ItemStack const &item) const
MCAPI void $startOpen(::Actor &actor)
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI int $getContainerSize() const
MCAPI void $dtor()
MCAPI int _getSlotWithRemainingSpace(::ItemStack const &newItem) const
MCAPI int _addResource(::ItemStack const &item)
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI ::std::unique_ptr<::ListTag > $saveToTag(::SaveContext const &saveContext) const
MCAPI int $getMaxStackSize() const
MCAPI bool removeResource(int type)
MCAPI void $setItem(int slot, ::ItemStack const &item)
static MCAPI void ** $vftable()
MCAPI void $_trySetInSlot(::ItemStack &item, int const &slot, int const &inventorySize, int &backCompatOffset)
Definition ItemStack.h:26
Definition ListTag.h:19
Definition Player.h:131
Definition SaveContext.h:5