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 slot) 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& recipes, ::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#ifdef LL_PLAT_C
66 MCAPI int _addItem(::ContainerScreenContext const& context, int modelSlot, int addCount);
67
68 MCFOLD bool canConsume(int modelSlot, int removeCount) const;
69
70 MCFOLD bool canDestroy(int modelSlot, int removeCount) const;
71
72 MCFOLD bool canDrop(int modelSlot, int removeCount) const;
73
74 MCAPI ::ItemSetType canSet(
76 int modelSlot,
77 ::ItemStackBase const& item,
78 ::ItemTransferAmount transferAmount,
79 bool allowSwap
80 ) const;
81
82 MCAPI int
83 getAvailableAddCount(::ContainerScreenContext const& context, int modelSlot, ::ItemStackBase const& fillItem) const;
84
85 MCAPI ::std::string const& getContainerName() const;
86
87 MCAPI int getContainerSize() const;
88
89 MCFOLD ::ItemInstance const& getItemInstance(int slot) const;
90
91 MCAPI ::ItemStack const& getItemStack(int slot) const;
92
93 MCAPI ::ItemStackBase const& getItemStackBase(int slot) const;
94
95 MCAPI bool isExpandableItemFiltered(int slot) const;
96
97 MCAPI bool isItemInstanceBased() const;
98
99 MCAPI ::ItemStack removeItem(int slot, int removeCount);
100
101 MCAPI bool setItem(
103 int slot,
104 ::ItemStack& stack,
105 ::ItemPlaceType type,
106 bool allowSwap
107 );
108#endif
109 // NOLINTEND
110
111public:
112 // destructor thunk
113 // NOLINTBEGIN
114 MCAPI void $dtor();
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120#ifdef LL_PLAT_C
121 MCFOLD ::ItemInstance const& $getRecipeItem(int slot) const;
122
123 MCFOLD bool $canRemove(int slot, int removeCount) const;
124
125 MCFOLD bool $isItemAllowed(::ItemStackBase const& item) const;
126
127 MCAPI bool $isItemFiltered(::Recipes const& recipes, ::ItemStackBase const& item) const;
128
129 MCFOLD int $getBackgroundStyle(int slot, bool inventoryContainsItem) const;
130
131 MCAPI ::ItemSetType $_canSet(
133 int modelSlot,
134 ::ItemStackBase const& item,
135 ::ItemTransferAmount transferAmount
136 ) const;
137
138 MCAPI int
139 $_getAvailableSetCount(::ContainerScreenContext const& context, int modelSlot, ::ItemStackBase const& item) const;
140
141 MCAPI bool $_canRemove(int modelSlot, int removeCount) const;
142
143 MCFOLD void $_onItemChanged(int modelSlot);
144#endif
145
146
147 // NOLINTEND
148
149public:
150 // vftables
151 // NOLINTBEGIN
152 MCNAPI static void** $vftable();
153 // NOLINTEND
154};
Definition ContainerController.h:20
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:36
Definition ItemTransferAmount.h:5
Definition context.h:5