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