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