LeviLamina
Loading...
Searching...
No Matches
CraftingContainerManagerModel.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/ContainerID.h"
7#include "mc/world/containers/ContainerEnumName.h"
8#include "mc/world/containers/managers/models/ContainerManagerModel.h"
9#include "mc/world/containers/models/FilterResult.h"
10#include "mc/world/containers/models/TextSearchMode.h"
11#include "mc/world/item/ItemInstance.h"
12#include "mc/world/item/crafting/RecipeIngredientSet.h"
13#include "mc/world/level/BlockPos.h"
14
15// auto generated forward declare list
16// clang-format off
17class ContainerModel;
21class ItemStack;
22class Player;
23// clang-format on
24
25class CraftingContainerManagerModel : public ::ContainerManagerModel {
26public:
27 // CraftingContainerManagerModel inner types define
28 using FilterFunction = ::std::function<::FilterResult(::ItemInstance const&, bool)>;
29
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockPos;
34 ::ll::TypedStorage<1, 1, bool> mWorkbench;
35 ::ll::TypedStorage<1, 1, bool> mPocket;
36 ::ll::TypedStorage<1, 1, bool> mCraftableFilterOn;
37 ::ll::TypedStorage<8, 32, ::std::string> mSearchString;
38 ::ll::TypedStorage<8, 32, ::std::string> mCaseFoldedSearchString;
39 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContainerModel>> mInventoryContainerModel;
40 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContainerModel>> mCraftingInputContainerModel;
41 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContainerModel>> mHotbarContainerModel;
42 ::ll::TypedStorage<8, 64, ::RecipeIngredientSet> mIngredientSet;
43 ::ll::TypedStorage<8, 128, ::ItemInstance> mLastCraftedItem;
44 ::ll::TypedStorage<4, 4, int> mContainerPopulationTabIndex;
45 ::ll::TypedStorage<8, 8, uint64> mContainerPopulationGroupIndex;
46 ::ll::TypedStorage<8, 8, uint64> mContainerPopulationGroupItemIndex;
47 ::ll::TypedStorage<8, 8, uint64> mContainerPopulationItemIndex;
48 ::ll::TypedStorage<8, 8, uint64> mContainerPopulationTotalItemCount;
49 // NOLINTEND
50
51#ifdef LL_PLAT_S
52#else // LL_PLAT_C
53public:
54 // prevent constructor by default
55 CraftingContainerManagerModel();
56
57#endif
58public:
59 // virtual functions
60 // NOLINTBEGIN
61 virtual ~CraftingContainerManagerModel() /*override*/ = default;
62
63 virtual ::std::vector<::ItemStack> getItemCopies() const /*override*/;
64
65 virtual void setSlot(int, ::ItemStack const&, bool) /*override*/;
66
67 virtual ::ItemStack const& getSlot(int) const /*override*/;
68
69 virtual void setData(int, int) /*override*/;
70
71 virtual void broadcastChanges() /*override*/;
72
73 virtual bool isValid(float pickRange) /*override*/;
74
75 virtual bool tick() /*override*/;
76
77 virtual ::ContainerScreenContext _postInit() /*override*/;
78 // NOLINTEND
79
80public:
81 // member functions
82 // NOLINTBEGIN
83#ifdef LL_PLAT_C
84 MCAPI CraftingContainerManagerModel(
85 ::ContainerID containerId,
86 ::Player& player,
87 bool workbench,
88 bool pocket,
89 bool craftableFilterOn,
90 ::BlockPos const& pos,
91 ::std::string const& inventorySearch
92 );
93
94 MCAPI ::std::shared_ptr<::FilteredContainerModel> _createContainerModel(
95 ::ContainerEnumName containerEnumName,
96 ::CreativeItemGroupCategory* const category,
97 bool doExpando,
98 ::std::function<::FilterResult(::ItemInstance const&, bool)> rule
99 );
100
101 MCAPI ::FilterResult _filterByInventory(::ItemInstance const& item, bool includeCursorItem) const;
102
103 MCAPI ::FilterResult _filterByText(::ItemInstance const& item, ::TextSearchMode searchMode) const;
104
105 MCAPI bool _foundInStartOfAnyWord(::std::string const& itemName) const;
106
107 MCAPI bool _hasUnlockedRecipes(::ItemInstance const& item) const;
108
109 MCAPI ::std::vector<::std::string> const getCraftingTags() const;
110
111 MCAPI bool hasIngredientSetChanged(::ItemStack const& inHand);
112
113 MCAPI void setIsFiltering(bool craftableFilterOn);
114
115 MCAPI void setSearchString(::std::string const& searchString);
116#endif
117 // NOLINTEND
118
119public:
120 // constructor thunks
121 // NOLINTBEGIN
122#ifdef LL_PLAT_C
123 MCAPI void* $ctor(
124 ::ContainerID containerId,
125 ::Player& player,
126 bool workbench,
127 bool pocket,
128 bool craftableFilterOn,
129 ::BlockPos const& pos,
130 ::std::string const& inventorySearch
131 );
132#endif
133 // NOLINTEND
134
135public:
136 // virtual function thunks
137 // NOLINTBEGIN
138#ifdef LL_PLAT_C
139 MCFOLD ::std::vector<::ItemStack> $getItemCopies() const;
140
141 MCFOLD void $setSlot(int, ::ItemStack const&, bool);
142
143 MCFOLD ::ItemStack const& $getSlot(int) const;
144
145 MCFOLD void $setData(int, int);
146
147 MCFOLD void $broadcastChanges();
148
149 MCAPI bool $isValid(float pickRange);
150
151 MCAPI bool $tick();
152
153 MCAPI ::ContainerScreenContext $_postInit();
154#endif
155
156
157 // NOLINTEND
158};
Definition BlockPos.h:17
Definition ContainerModel.h:24
Definition ContainerScreenContext.h:16
Definition CreativeItemGroupCategory.h:17
Definition FilteredContainerModel.h:19
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Player.h:129