LeviLamina
Loading...
Searching...
No Matches
ContainerController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/containers/controllers/ItemPlaceType.h"
7#include "mc/world/containers/controllers/ItemSetType.h"
8
9// auto generated forward declare list
10// clang-format off
11class ContainerModel;
13class ItemInstance;
14class ItemStack;
15class ItemStackBase;
16class Recipes;
18// clang-format on
19
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ContainerModel>> mContainerModel;
25 ::ll::TypedStorage<1, 1, bool> mDrop;
26 // NOLINTEND
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31#ifdef LL_PLAT_S
32 virtual ~ContainerController() = default;
33#else // LL_PLAT_C
34 virtual ~ContainerController();
35#endif
36
37 virtual ::ItemInstance const& getRecipeItem(int) const;
38
39 virtual bool canRemove(int slot, int removeCount) const;
40
41 virtual bool isItemAllowed(::ItemStackBase const& item) const;
42
43 virtual bool isItemFiltered(::Recipes const&, ::ItemStackBase const& item) const;
44
45 virtual int getBackgroundStyle(int slot, bool inventoryContainsItem) const;
46
47 virtual ::ItemSetType _canSet(
49 int modelSlot,
50 ::ItemStackBase const& item,
51 ::ItemTransferAmount transferAmount
52 ) const;
53
54 virtual int
55 _getAvailableSetCount(::ContainerScreenContext const& context, int modelSlot, ::ItemStackBase const& item) const;
56
57 virtual bool _canRemove(int modelSlot, int removeCount) const;
58
59 virtual void _onItemChanged(int modelSlot);
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCNAPI_C int _addItem(::ContainerScreenContext const& context, int modelSlot, int addCount);
66
67 MCNAPI_C bool canConsume(int modelSlot, int removeCount) const;
68
69 MCNAPI_C bool canDestroy(int modelSlot, int removeCount) const;
70
71 MCNAPI_C bool canDrop(int modelSlot, int removeCount) const;
72
73 MCNAPI_C ::ItemSetType canSet(
75 int modelSlot,
76 ::ItemStackBase const& item,
77 ::ItemTransferAmount transferAmount,
78 bool allowSwap
79 ) const;
80
81 MCNAPI_C int
82 getAvailableAddCount(::ContainerScreenContext const& context, int modelSlot, ::ItemStackBase const& fillItem) const;
83
84 MCNAPI_C ::std::string const& getContainerName() const;
85
86 MCNAPI_C int getContainerSize() const;
87
88 MCNAPI_C ::ItemInstance const& getItemInstance(int slot) const;
89
90 MCNAPI_C ::ItemStack const& getItemStack(int slot) const;
91
92 MCNAPI_C ::ItemStack removeItem(int slot, int removeCount);
93
94 MCNAPI_C bool setItem(
96 int slot,
97 ::ItemStack& stack,
98 ::ItemPlaceType type,
99 bool allowSwap
100 );
101 // NOLINTEND
102
103public:
104 // destructor thunk
105 // NOLINTBEGIN
106 MCNAPI void $dtor();
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112#ifdef LL_PLAT_C
113 MCNAPI ::ItemInstance const& $getRecipeItem(int) const;
114
115 MCNAPI bool $canRemove(int slot, int removeCount) const;
116
117 MCNAPI bool $isItemAllowed(::ItemStackBase const& item) const;
118
119 MCNAPI bool $isItemFiltered(::Recipes const&, ::ItemStackBase const& item) const;
120
121 MCNAPI int $getBackgroundStyle(int slot, bool inventoryContainsItem) const;
122
123 MCNAPI ::ItemSetType $_canSet(
125 int modelSlot,
126 ::ItemStackBase const& item,
127 ::ItemTransferAmount transferAmount
128 ) const;
129
130 MCNAPI int
131 $_getAvailableSetCount(::ContainerScreenContext const& context, int modelSlot, ::ItemStackBase const& item) const;
132
133 MCNAPI bool $_canRemove(int modelSlot, int removeCount) const;
134
135 MCNAPI void $_onItemChanged(int modelSlot);
136#endif
137
138
139 // NOLINTEND
140
141public:
142 // vftables
143 // NOLINTBEGIN
144 MCNAPI static void** $vftable();
145 // NOLINTEND
146};
Definition ContainerController.h:20
MCAPI void $dtor()
static MCAPI void ** $vftable()
Definition ContainerModel.h:27
Definition ContainerScreenContext.h:17
Definition ItemInstance.h:15
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Recipes.h:35
Definition ItemTransferAmount.h:5
Definition context.h:5