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