LeviLamina
Loading...
Searching...
No Matches
EnchantingContainerManagerModel.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/managers/models/ContainerManagerModel.h"
8#include "mc/world/item/enchanting/ItemEnchantOption.h"
9#include "mc/world/level/BlockPos.h"
10
11// auto generated forward declare list
12// clang-format off
14class ItemEnchants;
15class ItemStack;
16class Player;
17// clang-format on
18
19class EnchantingContainerManagerModel : public ::ContainerManagerModel {
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockPos;
24 ::ll::TypedStorage<1, 1, bool> mShouldBookBeOpen;
25 ::ll::TypedStorage<8, 24, ::std::vector<::ItemEnchantOption>> mEnchantOptions;
26 ::ll::TypedStorage<8, 64, ::std::function<void(::EnchantingContainerManagerModel&)>> mOptionsChangedCallback;
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
31 EnchantingContainerManagerModel();
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ~EnchantingContainerManagerModel() /*override*/ = default;
37
38 virtual ::std::vector<::ItemStack> getItemCopies() const /*override*/;
39
40 virtual void setSlot(int slot, ::ItemStack const& item, bool) /*override*/;
41
42 virtual ::ItemStack const& getSlot(int slot) const /*override*/;
43
44 virtual void setData(int, int) /*override*/;
45
46 virtual bool isValid(float pickRange) /*override*/;
47
48 virtual void broadcastChanges() /*override*/;
49
50 virtual ::ContainerScreenContext _postInit() /*override*/;
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI EnchantingContainerManagerModel(::ContainerID containerId, ::Player& player, ::BlockPos const& blockPos);
57
58#ifdef LL_PLAT_C
59 MCAPI void fireItemEnchantedEvent(::ItemStack const& item, ::ItemEnchants const& enchants);
60#endif
61
62 MCFOLD ::std::vector<::ItemEnchantOption> const& getEnchantOptions() const;
63
64#ifdef LL_PLAT_C
65 MCAPI int getLapisCount();
66
67 MCAPI void getNewEnchantmentSeed();
68
69 MCAPI bool getShouldBookBeOpen() const;
70#endif
71
72 MCAPI void recalculateOptions();
73
74#ifdef LL_PLAT_C
75 MCAPI void registerOptionsChangedCallback(::std::function<void(::EnchantingContainerManagerModel&)> callback);
76
77 MCAPI void setOptions(::std::vector<::ItemEnchantOption> const& options);
78
79 MCAPI void setShouldBookBeOpen(bool shouldBeOpen);
80#endif
81 // NOLINTEND
82
83public:
84 // static variables
85 // NOLINTBEGIN
86 MCAPI static int const& NUM_OPTIONS();
87 // NOLINTEND
88
89public:
90 // constructor thunks
91 // NOLINTBEGIN
92 MCAPI void* $ctor(::ContainerID containerId, ::Player& player, ::BlockPos const& blockPos);
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCAPI ::std::vector<::ItemStack> $getItemCopies() const;
99
100 MCAPI void $setSlot(int slot, ::ItemStack const& item, bool);
101
102 MCAPI ::ItemStack const& $getSlot(int slot) const;
103
104 MCFOLD void $setData(int, int);
105
106 MCAPI bool $isValid(float pickRange);
107
108 MCFOLD void $broadcastChanges();
109
110 MCAPI ::ContainerScreenContext $_postInit();
111
112
113 // NOLINTEND
114
115public:
116 // vftables
117 // NOLINTBEGIN
118 MCAPI static void** $vftable();
119 // NOLINTEND
120};
Definition BlockPos.h:21
Definition ContainerScreenContext.h:19
Definition ItemEnchants.h:15
Definition ItemStack.h:35
Definition Player.h:137