LeviLamina
Loading...
Searching...
No Matches
HumanoidArmorItem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
7#include "mc/deps/shared_types/legacy/actor/ActorLocation.h"
8#include "mc/deps/shared_types/legacy/actor/ArmorSlot.h"
9#include "mc/world/item/Item.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BaseGameVersion;
15class BlockSource;
16class CompoundTag;
17class Container;
18class ItemDescriptor;
19class ItemInstance;
20class ItemStack;
21class ItemStackBase;
22class Level;
23class Mob;
24class Player;
25class Vec3;
27namespace Bedrock::Safety { class RedactableString; }
28namespace mce { class Color; }
29// clang-format on
30
31class HumanoidArmorItem : public ::Item {
32public:
33 // HumanoidArmorItem inner types declare
34 // clang-format off
35 class ArmorMaterial;
36 // clang-format on
37
38 // HumanoidArmorItem inner types define
39 enum class Tier : int {
40 Leather = 0,
41 Chain = 1,
42 Iron = 2,
43 Diamond = 3,
44 Gold = 4,
45 Elytra = 5,
46 Turtle = 6,
47 Netherite = 7,
48 Copper = 8,
49 };
50
52 public:
53 // member variables
54 // NOLINTBEGIN
55 ::ll::TypedStorage<4, 4, int> mDurabilityMultiplier;
56 ::ll::TypedStorage<4, 16, int[4]> mSlotProtections;
57 ::ll::TypedStorage<4, 4, int> mToughnessValue;
58 ::ll::TypedStorage<4, 4, int> mEnchantmentValue;
59 ::ll::TypedStorage<4, 4, float> mKnockbackResistance;
60 // NOLINTEND
61 };
62
63public:
64 // member variables
65 // NOLINTBEGIN
66 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::ArmorSlot const> mSlot;
67 ::ll::TypedStorage<4, 4, int const> mDefense;
68 ::ll::TypedStorage<4, 4, int const> mModelIndex;
69 ::ll::TypedStorage<8, 8, ::HumanoidArmorItem::ArmorMaterial const&> mArmorType;
70 ::ll::TypedStorage<1, 1, bool> mCurrentVersionAllowsTrim;
71 // NOLINTEND
72
73public:
74 // prevent constructor by default
75 HumanoidArmorItem& operator=(HumanoidArmorItem const&);
78
79public:
80 // virtual functions
81 // NOLINTBEGIN
82 // vIndex: 10
83 virtual bool isHumanoidArmor() const /*override*/;
84
85 // vIndex: 53
86 virtual bool isValidRepairItem(
87 ::ItemStackBase const& source,
88 ::ItemStackBase const& repairItem,
89 ::BaseGameVersion const& baseGameVersion
90 ) const /*override*/;
91
92 // vIndex: 54
93 virtual int getEnchantSlot() const /*override*/;
94
95 // vIndex: 55
96 virtual int getEnchantValue() const /*override*/;
97
98 // vIndex: 56
99 virtual int getArmorValue() const /*override*/;
100
101 // vIndex: 57
102 virtual int getToughnessValue() const /*override*/;
103
104 // vIndex: 123
105 virtual float getArmorKnockbackResistance() const;
106
107 // vIndex: 67
108 virtual bool hasCustomColor(::CompoundTag const* userData) const /*override*/;
109
110 // vIndex: 66
111 virtual ::mce::Color getColor(::CompoundTag const* userData, ::ItemDescriptor const&) const /*override*/;
112
113 // vIndex: 69
114 virtual void clearColor(::ItemStackBase& instance) const /*override*/;
115
116 // vIndex: 70
117 virtual void setColor(::ItemStackBase& item, ::mce::Color const& color) const /*override*/;
118
119 // vIndex: 15
120 virtual bool isDyeable() const /*override*/;
121
122 // vIndex: 22
123 virtual bool isTrimAllowed() const /*override*/;
124
125 // vIndex: 103
126 virtual ::SharedTypes::Legacy::ActorLocation getEquipLocation() const /*override*/;
127
128 // vIndex: 104
129 virtual ::SharedTypes::Legacy::LevelSoundEvent getEquipSound() const /*override*/;
130
131 // vIndex: 61
132 virtual int getDamageChance(int unbreaking) const /*override*/;
133
134 // vIndex: 80
135 virtual bool dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const
136 /*override*/;
137
138 // vIndex: 52
139 virtual void appendFormattedHovertext(
140 ::ItemStackBase const& stack,
141 ::Level& level,
142 ::Bedrock::Safety::RedactableString& hovertext,
143 bool const showCategory
144 ) const /*override*/;
145
146 // vIndex: 84
147 virtual void hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const /*override*/;
148
149 // vIndex: 110
150 virtual ::ResolvedItemIconInfo
151 getIconInfo(::ItemStackBase const& item, int newAnimationFrame, bool inInventoryPane) const /*override*/;
152
153 // vIndex: 76
154 virtual ::ItemStack& use(::ItemStack& item, ::Player& player) const /*override*/;
155
156 // vIndex: 74
157 virtual int buildIdAux(short auxValue, ::CompoundTag const* userData) const /*override*/;
158
159 // vIndex: 0
160 virtual ~HumanoidArmorItem() /*override*/ = default;
161 // NOLINTEND
162
163public:
164 // member functions
165 // NOLINTBEGIN
166 MCAPI ::std::string _buildAttributeText() const;
167
168 MCAPI ::ItemInstance getTierItem() const;
169 // NOLINTEND
170
171public:
172 // static variables
173 // NOLINTBEGIN
174 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& CHAIN();
175
176 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& COPPER();
177
178 MCAPI static ::mce::Color& DEFAULT_LEATHER_COLOR();
179
180 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& DIAMOND();
181
182 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& ELYTRA();
183
184 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& GOLD();
185
186 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& IRON();
187
188 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& LEATHER();
189
190 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& NETHERITE();
191
192 MCAPI static ::HumanoidArmorItem::ArmorMaterial const& TURTLE();
193 // NOLINTEND
194
195public:
196 // virtual function thunks
197 // NOLINTBEGIN
198 MCFOLD bool $isHumanoidArmor() const;
199
200 MCAPI bool $isValidRepairItem(
201 ::ItemStackBase const& source,
202 ::ItemStackBase const& repairItem,
203 ::BaseGameVersion const& baseGameVersion
204 ) const;
205
206 MCAPI int $getEnchantSlot() const;
207
208 MCAPI int $getEnchantValue() const;
209
210 MCFOLD int $getArmorValue() const;
211
212 MCAPI int $getToughnessValue() const;
213
214 MCAPI float $getArmorKnockbackResistance() const;
215
216 MCAPI bool $hasCustomColor(::CompoundTag const* userData) const;
217
218 MCAPI ::mce::Color $getColor(::CompoundTag const* userData, ::ItemDescriptor const&) const;
219
220 MCFOLD void $clearColor(::ItemStackBase& instance) const;
221
222 MCFOLD void $setColor(::ItemStackBase& item, ::mce::Color const& color) const;
223
224 MCAPI bool $isDyeable() const;
225
226 MCAPI bool $isTrimAllowed() const;
227
228 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const;
229
230 MCAPI int $getDamageChance(int unbreaking) const;
231
232 MCAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const;
233
234 MCAPI void $appendFormattedHovertext(
235 ::ItemStackBase const& stack,
236 ::Level& level,
237 ::Bedrock::Safety::RedactableString& hovertext,
238 bool const showCategory
239 ) const;
240
241 MCFOLD void $hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const;
242
244 $getIconInfo(::ItemStackBase const& item, int newAnimationFrame, bool inInventoryPane) const;
245
246 MCAPI ::ItemStack& $use(::ItemStack& item, ::Player& player) const;
247
248 MCAPI int $buildIdAux(short auxValue, ::CompoundTag const* userData) const;
249 // NOLINTEND
250
251public:
252 // vftables
253 // NOLINTBEGIN
254 MCNAPI static void** $vftable();
255 // NOLINTEND
256};
Definition Actor.h:102
Definition BaseGameVersion.h:8
Definition BlockSource.h:66
Definition CompoundTag.h:13
Definition Container.h:31
Definition HumanoidArmorItem.h:51
Definition HumanoidArmorItem.h:31
static MCAPI void ** $vftable()
Definition ItemDescriptor.h:22
Definition ItemInstance.h:15
Definition ItemStackBase.h:34
Definition ItemStack.h:23
Definition Item.h:66
Definition Level.h:243
Definition Mob.h:47
Definition Player.h:123
Definition Turtle.h:14
Definition Vec3.h:10
STL namespace.
Definition ResolvedItemIconInfo.h:8