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 CompoundTag;
20class ContainerModel;
23class ItemDescriptor;
24class ItemStack;
25class Player;
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<::ItemInstance>> 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 fromNetwork) /*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(
89 ::HashedString const& recipeTag,
90 ::SharedTypes::Legacy::ContainerType containerType,
91 ::BlockActorType blockActorType,
92 ::ContainerID containerId,
93 ::Player& player,
94 ::BlockPos const& blockPos
95 );
96
97 MCAPI ::FilterResult _filterByInventory(::ItemInstance const& item, bool includeCursorItem) const;
98
99 MCAPI ::FilterResult _filterByText(::ItemInstance const& item, ::TextSearchMode searchMode) const;
100
101 MCAPI ::FurnaceBlockActor* _getFurnaceEntity();
102
103 MCAPI bool _itemValidForRecipe(::ItemDescriptor const& recipeItem, ::ItemStack const& item) const;
104
105 MCFOLD bool
106 _itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs, ::CompoundTag const* rhsTag) const;
107
108 MCAPI void _populateRecipeBook();
109
110 MCAPI void _updateResultSlotInfo();
111
112#ifdef LL_PLAT_C
113 MCAPI void fireItemAcquiredEvent(::ItemInstance const& itemInstance, int count);
114
115 MCAPI bool isFinished(::std::string& outputName, int& outputId, int& outputAuxValue);
116#endif
117
118 MCAPI ::IngredientSearchInfo searchIngredientInContainers(
119 ::ItemInstance const& itemInstance,
120 ::std::vector<::ContainerModel*> const& containers
121 ) const;
122
123 MCAPI void setIsFiltering(bool smeltableFilterOn);
124
125#ifdef LL_PLAT_C
126 MCAPI void setSearchString(::std::string const& searchString);
127#endif
128 // NOLINTEND
129
130public:
131 // constructor thunks
132 // NOLINTBEGIN
133 MCAPI void* $ctor(
134 ::HashedString const& recipeTag,
135 ::SharedTypes::Legacy::ContainerType containerType,
136 ::BlockActorType blockActorType,
137 ::ContainerID containerId,
138 ::Player& player,
139 ::BlockPos const& blockPos
140 );
141 // NOLINTEND
142
143public:
144 // destructor thunk
145 // NOLINTBEGIN
146 MCAPI void $dtor();
147 // NOLINTEND
148
149public:
150 // virtual function thunks
151 // NOLINTBEGIN
152 MCAPI ::std::vector<::ItemStack> $getItemCopies() const;
153
154 MCAPI void $setSlot(int slot, ::ItemStack const& item, bool fromNetwork);
155
156 MCAPI ::ItemStack const& $getSlot(int slot) const;
157
158 MCAPI void $setData(int id, int value);
159
160 MCAPI bool $isValid(float pickRange);
161
162 MCAPI void $broadcastChanges();
163
164 MCAPI ::ContainerScreenContext $_postInit();
165
166 MCAPI void $_onDynamicContainerContentsChanged();
167
168
169 // NOLINTEND
170
171public:
172 // vftables
173 // NOLINTBEGIN
174 MCAPI static void** $vftable();
175 // NOLINTEND
176};
Definition BlockPos.h:19
Definition CompoundTag.h:23
Definition ContainerModel.h:27
Definition ContainerScreenContext.h:17
Definition FurnaceBlockActor.h:33
Definition HashedString.h:5
static MCAPI void ** $vftable()
Definition ItemDescriptor.h:24
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Player.h:129
Definition IngredientSearchInfo.h:10