LeviLamina
Loading...
Searching...
No Matches
FurnaceContainerManagerModel.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/deps/shared_types/legacy/ContainerType.h"
8#include "mc/world/ContainerID.h"
9#include "mc/world/containers/ContainerEnumName.h"
10#include "mc/world/containers/managers/models/ContainerManagerModel.h"
11#include "mc/world/containers/models/FilterResult.h"
12#include "mc/world/containers/models/TextSearchMode.h"
13#include "mc/world/item/ItemInstance.h"
14#include "mc/world/level/BlockPos.h"
15#include "mc/world/level/block/actor/BlockActorType.h"
16
17// auto generated forward declare list
18// clang-format off
19class ContainerModel;
22class ItemDescriptor;
23class ItemStack;
24class Player;
25class Recipe;
27// clang-format on
28
29class FurnaceContainerManagerModel : public ::ContainerManagerModel {
30public:
31 // FurnaceContainerManagerModel inner types define
32 using FilterFunction = ::std::function<::FilterResult(::ItemInstance const&, bool)>;
33
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockPos;
38 ::ll::TypedStorage<4, 4, int> mLastTickCount;
39 ::ll::TypedStorage<4, 4, int> mLastLitTime;
40 ::ll::TypedStorage<4, 4, int> mLastLitDuration;
41 ::ll::TypedStorage<4, 4, int> mLastStoredXP;
42 ::ll::TypedStorage<4, 4, int> mLastInputId;
43 ::ll::TypedStorage<4, 4, int> mLastInputAux;
44 ::ll::TypedStorage<8, 128, ::ItemInstance> mLastCraftedItem;
45 ::ll::TypedStorage<8, 32, ::std::string> mLastOutputName;
46 ::ll::TypedStorage<4, 4, int> mLastResultDisplayId;
47 ::ll::TypedStorage<1, 1, ::BlockActorType const> mBlockActorType;
48 ::ll::TypedStorage<1, 1, ::ContainerEnumName const> mIngredientContainerName;
49 ::ll::TypedStorage<8, 48, ::HashedString const> mRecipeTag;
50 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::Recipe>>> mRecipeBook;
51 ::ll::TypedStorage<1, 1, bool> mSmeltableFilterOn;
52 ::ll::TypedStorage<8, 32, ::std::string> mSearchString;
53 ::ll::TypedStorage<8, 32, ::std::string> mCaseFoldedSearchString;
54 ::ll::TypedStorage<4, 4, int> mNumFoodRecipes;
55 ::ll::TypedStorage<4, 4, int> mNumBlocksRecipes;
56 ::ll::TypedStorage<4, 4, int> mNumItemsRecipes;
57 // NOLINTEND
58
59public:
60 // prevent constructor by default
61 FurnaceContainerManagerModel();
62
63public:
64 // virtual functions
65 // NOLINTBEGIN
66 virtual ~FurnaceContainerManagerModel() /*override*/;
67
68 virtual ::std::vector<::ItemStack> getItemCopies() const /*override*/;
69
70 virtual void setSlot(int slot, ::ItemStack const& item, bool) /*override*/;
71
72 virtual ::ItemStack const& getSlot(int slot) const /*override*/;
73
74 virtual void setData(int id, int value) /*override*/;
75
76 virtual bool isValid(float pickRange) /*override*/;
77
78 virtual void broadcastChanges() /*override*/;
79
80 virtual ::ContainerScreenContext _postInit() /*override*/;
81
82 virtual void _onDynamicContainerContentsChanged() /*override*/;
83 // NOLINTEND
84
85public:
86 // member functions
87 // NOLINTBEGIN
88 MCAPI FurnaceContainerManagerModel(::ContainerID containerId, ::Player& player, ::BlockPos const& blockPos);
89
90 MCAPI FurnaceContainerManagerModel(
91 ::HashedString const& recipeTag,
92 ::SharedTypes::Legacy::ContainerType containerType,
93 ::BlockActorType blockActorType,
94 ::ContainerID containerId,
95 ::Player& player,
96 ::BlockPos const& blockPos
97 );
98
99 MCAPI ::FilterResult _filterByInventory(::ItemInstance const& item, bool includeCursorItem) const;
100
101 MCAPI ::FilterResult _filterByText(::ItemInstance const& item, ::TextSearchMode searchMode) const;
102
103 MCAPI ::FilterResult
104 _filterByTextAndInventory(::ItemInstance const& item, bool includeCursorItem, ::TextSearchMode searchMode) const;
105
106 MCAPI bool _foundInStartOfAnyWord(::std::string const& itemName) const;
107
108 MCAPI ::FurnaceBlockActor* _getFurnaceEntity();
109
110 MCAPI bool _hasUnlockedRecipes(::ItemInstance const& item) const;
111
112 MCAPI void _populateRecipeBook();
113
114 MCAPI void _updateResultSlotInfo();
115
116#ifdef LL_PLAT_C
117 MCAPI void fireItemAcquiredEvent(::ItemInstance const& itemInstance, int count);
118
119 MCAPI void fireItemSmeltedEvent(::ItemDescriptor const& itemDescriptor);
120
121 MCAPI int getBurnProgress(int max);
122
123 MCAPI int getLitProgress(int max);
124#endif
125
126 MCAPI ::std::vector<::ItemInstance> getUnlockedRecipeIngredientsForResult(::ItemInstance const& item) const;
127
128#ifdef LL_PLAT_C
129 MCAPI bool isFinished(::std::string& outputName, int& outputId, int& outputAuxValue);
130#endif
131
132 MCAPI ::IngredientSearchInfo searchIngredientInContainers(
133 ::ItemInstance const& itemInstance,
134 ::std::vector<::ContainerModel*> const& containers
135 ) const;
136
137 MCAPI void setIsFiltering(bool smeltableFilterOn);
138
139#ifdef LL_PLAT_C
140 MCAPI void setSearchString(::std::string const& searchString);
141#endif
142 // NOLINTEND
143
144public:
145 // constructor thunks
146 // NOLINTBEGIN
147 MCAPI void* $ctor(::ContainerID containerId, ::Player& player, ::BlockPos const& blockPos);
148
149 MCAPI void* $ctor(
150 ::HashedString const& recipeTag,
151 ::SharedTypes::Legacy::ContainerType containerType,
152 ::BlockActorType blockActorType,
153 ::ContainerID containerId,
154 ::Player& player,
155 ::BlockPos const& blockPos
156 );
157 // NOLINTEND
158
159public:
160 // destructor thunk
161 // NOLINTBEGIN
162 MCAPI void $dtor();
163 // NOLINTEND
164
165public:
166 // virtual function thunks
167 // NOLINTBEGIN
168 MCAPI ::std::vector<::ItemStack> $getItemCopies() const;
169
170 MCAPI void $setSlot(int slot, ::ItemStack const& item, bool);
171
172 MCAPI ::ItemStack const& $getSlot(int slot) const;
173
174 MCAPI void $setData(int id, int value);
175
176 MCAPI bool $isValid(float pickRange);
177
178 MCAPI void $broadcastChanges();
179
180 MCAPI ::ContainerScreenContext $_postInit();
181
182 MCAPI void $_onDynamicContainerContentsChanged();
183
184
185 // NOLINTEND
186
187public:
188 // vftables
189 // NOLINTBEGIN
190 MCAPI static void** $vftable();
191 // NOLINTEND
192};
Definition BlockPos.h:21
Definition ContainerModel.h:28
Definition ContainerScreenContext.h:19
Definition FurnaceBlockActor.h:33
Definition HashedString.h:5
Definition ItemDescriptor.h:25
Definition ItemInstance.h:15
Definition ItemStack.h:35
Definition Player.h:136
Definition Recipe.h:32
Definition IngredientSearchInfo.h:10