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