11#pragma once
2+
23#include " modapi/Macros.h"
4+ #include < mc/_HeaderOutputPredefine.h>
5+
6+ // auto generated inclusion list
37#include < mc/deps/shared_types/legacy/LevelSoundEvent.h>
48#include < mc/deps/shared_types/legacy/actor/ActorLocation.h>
59#include < mc/deps/shared_types/legacy/actor/ArmorSlot.h>
610#include < mc/world/item/Item.h>
711
12+ // auto generated forward declare list
13+ // clang-format off
814class Actor ;
915class BaseGameVersion ;
1016class BlockSource ;
@@ -19,15 +25,18 @@ class Mob;
1925class Player ;
2026class Vec3 ;
2127struct ResolvedItemIconInfo ;
22- namespace Bedrock ::Safety {
23- class RedactableString ;
24- }
25- namespace mce {
26- class Color ;
27- }
28+ namespace Bedrock ::Safety { class RedactableString ; }
29+ namespace mce { class Color ; }
30+ // clang-format on
2831
2932class HumanoidArmorItem : public ::Item {
3033public:
34+ // HumanoidArmorItem inner types declare
35+ // clang-format off
36+ class ArmorMaterial ;
37+ // clang-format on
38+
39+ // HumanoidArmorItem inner types define
3140 enum class Tier : int {
3241 Leather = 0 ,
3342 Chain = 1 ,
@@ -37,62 +46,76 @@ class HumanoidArmorItem : public ::Item {
3746 Elytra = 5 ,
3847 Turtle = 6 ,
3948 Netherite = 7 ,
49+ Copper = 8 ,
4050 };
4151
4252 class ArmorMaterial {
4353 public:
54+ // member variables
55+ // NOLINTBEGIN
4456 int mDurabilityMultiplier ;
4557 int mSlotProtections [4 ];
4658 int mToughnessValue ;
4759 int mEnchantmentValue ;
4860 float mKnockbackResistance ;
61+ // NOLINTEND
4962 };
5063
5164public:
52- ::SharedTypes::Legacy::ArmorSlot mSlot ;
53- int mDefense ;
54- int mModelIndex ;
55- ArmorMaterial const & mArmorType ;
56- bool mCurrentVersionAllowsTrim ;
65+ // member variables
66+ // NOLINTBEGIN
67+ ::SharedTypes::Legacy::ArmorSlot mSlot ;
68+ int mDefense ;
69+ int mModelIndex ;
70+ ::HumanoidArmorItem::ArmorMaterial const & mArmorType ;
71+ bool mCurrentVersionAllowsTrim ;
72+ // NOLINTEND
5773
5874public:
59- MOD_NDAPI HumanoidArmorItem (std::string const & name, HumanoidArmorItem::Tier armorTier);
75+ // prevent constructor by default
76+ MOD_NDAPI HumanoidArmorItem (std::string const & name, HumanoidArmorItem::Tier armorTier);
77+ HumanoidArmorItem& operator =(HumanoidArmorItem const &);
78+ HumanoidArmorItem (HumanoidArmorItem const &);
79+ HumanoidArmorItem ();
6080
81+ public:
82+ // virtual functions
83+ // NOLINTBEGIN
6184 // vIndex: 10
6285 virtual bool isHumanoidArmor () const /* override*/ ;
6386
64- // vIndex: 53
87+ // vIndex: 54
6588 virtual bool isValidRepairItem (
6689 ::ItemStackBase const & source,
6790 ::ItemStackBase const & repairItem,
6891 ::BaseGameVersion const & baseGameVersion
6992 ) const /* override*/ ;
7093
71- // vIndex: 54
94+ // vIndex: 55
7295 virtual int getEnchantSlot () const /* override*/ ;
7396
74- // vIndex: 55
97+ // vIndex: 56
7598 virtual int getEnchantValue () const /* override*/ ;
7699
77- // vIndex: 56
100+ // vIndex: 57
78101 virtual int getArmorValue () const /* override*/ ;
79102
80- // vIndex: 57
103+ // vIndex: 58
81104 virtual int getToughnessValue () const /* override*/ ;
82105
83- // vIndex: 121
106+ // vIndex: 124
84107 virtual float getArmorKnockbackResistance () const ;
85108
86- // vIndex: 67
109+ // vIndex: 68
87110 virtual bool hasCustomColor (::CompoundTag const * userData) const /* override*/ ;
88111
89- // vIndex: 66
112+ // vIndex: 67
90113 virtual ::mce::Color getColor (::CompoundTag const * userData, ::ItemDescriptor const &) const /* override*/ ;
91114
92- // vIndex: 69
115+ // vIndex: 70
93116 virtual void clearColor (::ItemStackBase& instance) const /* override*/ ;
94117
95- // vIndex: 70
118+ // vIndex: 71
96119 virtual void setColor (::ItemStackBase& item, ::mce::Color const & color) const /* override*/ ;
97120
98121 // vIndex: 15
@@ -101,59 +124,79 @@ class HumanoidArmorItem : public ::Item {
101124 // vIndex: 22
102125 virtual bool isTrimAllowed () const /* override*/ ;
103126
104- // vIndex: 101
127+ // vIndex: 104
105128 virtual ::SharedTypes::Legacy::ActorLocation getEquipLocation () const /* override*/ ;
106129
107- // vIndex: 102
130+ // vIndex: 105
108131 virtual ::SharedTypes::Legacy::LevelSoundEvent getEquipSound () const /* override*/ ;
109132
110- // vIndex: 61
133+ // vIndex: 62
111134 virtual int getDamageChance (int unbreaking) const /* override*/ ;
112135
113- // vIndex: 78
136+ // vIndex: 81
114137 virtual bool dispense (::BlockSource& region, ::Container& container, int slot, ::Vec3 const & pos, uchar) const
115138 /* override*/ ;
116139
117- // vIndex: 52
140+ // vIndex: 53
118141 virtual void appendFormattedHovertext (
119142 ::ItemStackBase const & stack,
120143 ::Level& level,
121144 ::Bedrock::Safety::RedactableString& hovertext,
122145 bool const showCategory
123146 ) const /* override*/ ;
124147
125- // vIndex: 82
148+ // vIndex: 85
126149 virtual void hurtActor (::ItemStack& item, ::Actor& actor, ::Mob& attacker) const /* override*/ ;
127150
128- // vIndex: 108
151+ // vIndex: 111
129152 virtual ::ResolvedItemIconInfo
130153 getIconInfo (::ItemStackBase const & item, int newAnimationFrame, bool inInventoryPane) const /* override*/ ;
131154
132- // vIndex: 76
155+ // vIndex: 77
133156 virtual ::ItemStack& use (::ItemStack& item, ::Player& player) const /* override*/ ;
134157
135- // vIndex: 74
158+ // vIndex: 75
136159 virtual int buildIdAux (short auxValue, ::CompoundTag const * userData) const /* override*/ ;
137160
138161 // vIndex: 0
139162 virtual ~HumanoidArmorItem () /* override*/ = default ;
163+ // NOLINTEND
140164
141165public:
166+ // member functions
167+ // NOLINTBEGIN
168+ MCAPI ::std::string _buildAttributeText () const ;
169+
142170 MCAPI ::ItemInstance getTierItem () const ;
171+ // NOLINTEND
143172
144173public:
145- MCAPI static ArmorMaterial const & CHAIN ();
146- MCAPI static ArmorMaterial const & COPPER ();
147- MCAPI static ::mce::Color& DEFAULT_LEATHER_COLOR ();
148- MCAPI static ArmorMaterial const & DIAMOND ();
149- MCAPI static ArmorMaterial const & ELYTRA ();
150- MCAPI static ArmorMaterial const & GOLD ();
151- MCAPI static ArmorMaterial const & IRON ();
152- MCAPI static ArmorMaterial const & LEATHER ();
153- MCAPI static ArmorMaterial const & NETHERITE ();
154- MCAPI static ArmorMaterial const & TURTLE ();
174+ // static variables
175+ // NOLINTBEGIN
176+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & CHAIN ();
177+
178+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & COPPER ();
179+
180+ MCAPI static ::mce::Color& DEFAULT_LEATHER_COLOR ();
181+
182+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & DIAMOND ();
183+
184+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & ELYTRA ();
185+
186+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & GOLD ();
187+
188+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & IRON ();
189+
190+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & LEATHER ();
191+
192+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & NETHERITE ();
193+
194+ MCAPI static ::HumanoidArmorItem::ArmorMaterial const & TURTLE ();
195+ // NOLINTEND
155196
156197public:
198+ // virtual function thunks
199+ // NOLINTBEGIN
157200 MCFOLD bool $isHumanoidArmor() const ;
158201
159202 MCAPI bool $isValidRepairItem(
@@ -184,8 +227,6 @@ class HumanoidArmorItem : public ::Item {
184227
185228 MCAPI bool $isTrimAllowed() const ;
186229
187- MCAPI ::SharedTypes::Legacy::ActorLocation $getEquipLocation() const ;
188-
189230 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const ;
190231
191232 MCAPI int $getDamageChance(int unbreaking) const ;
@@ -207,7 +248,25 @@ class HumanoidArmorItem : public ::Item {
207248 MCAPI ::ItemStack& $use(::ItemStack& item, ::Player& player) const ;
208249
209250 MCAPI int $buildIdAux(short auxValue, ::CompoundTag const * userData) const ;
251+ // NOLINTEND
210252
211253public:
254+ // vftables
255+ // NOLINTBEGIN
212256 MCNAPI static void ** $vftable();
213- };
257+ // NOLINTEND
258+
259+ // tmpe fix
260+ MOD_API PuvLoadData::LoadResultWithTiming initServer (
261+ Json::Value const & json,
262+ SemVersion const & version,
263+ IPackLoadContext& context,
264+ JsonBetaState state
265+ ) override ;
266+ MOD_API PuvLoadData::LoadResultWithTiming initClient (
267+ Json::Value const & json,
268+ SemVersion const & version,
269+ JsonBetaState state,
270+ IPackLoadContext& context
271+ ) override ;
272+ };
0 commit comments