17 enum class Type : uchar {
22 ProjectileProtection = 4,
29 BaneOfArthropods = 11,
46 CurseOfVanishing = 28,
60 InvalidEnchantment = 42,
63 enum class Frequency :
int {
70 enum class Slot : uint {
85 FishingRod = 1u << 12,
86 CarrotStick = 1u << 13,
91 CosmeticHead = 1u << 18,
93 MushroomStick = 1u << 20,
95 HeavyWeapon = 1u << 22,
96 GArmor = ArmorHead | ArmorTorso | ArmorFeet | ArmorLegs,
97 GDigging = Hoe | Axe | Pickaxe | Shovel,
98 GTool = Hoe | Shears | Flintsteel | Shield,
102 enum class Activation :
int {
110 enum class CompatibilityID :
int {
120 enum class VillagerTrading :
int {
128 ::ll::TypedStorage<1, 1, ::Enchant::Type const> mEnchantType;
129 ::ll::TypedStorage<4, 4, ::Enchant::Frequency const> mFrequency;
130 ::ll::TypedStorage<1, 1, bool const> mIsAvailableInVillagerTrading;
131 ::ll::TypedStorage<4, 4, int const> mPrimarySlots;
132 ::ll::TypedStorage<4, 4, int const> mSecondarySlots;
133 ::ll::TypedStorage<4, 4, int const> mCompatibility;
134 ::ll::TypedStorage<8, 32, ::std::string const> mDescription;
135 ::ll::TypedStorage<8, 48, ::HashedString const> mStringId;
136 ::ll::TypedStorage<8, 48, ::HashedString const> mScriptStringId;
137 ::ll::TypedStorage<1, 1, bool> mIsDisabled;
147 virtual bool isCompatibleWith(::Enchant::Type type)
const;
150 virtual int getMinCost(
int level)
const;
153 virtual int getMaxCost(
int level)
const;
156 virtual int getMinLevel()
const;
159 virtual int getMaxLevel()
const;
165 virtual float getAfterBreachArmorFraction(
int,
float)
const;
168 virtual float getDamageBonus(
int,
::Actor const&,
::Actor const&)
const;
171 virtual void doPostAttack(
::Actor& attacker,
::Actor& victim,
int level)
const;
180 virtual bool isMeleeDamageEnchant()
const;
183 virtual bool isProtectionEnchant()
const;
186 virtual bool isTreasureOnly()
const;
189 virtual bool isDiscoverable()
const;
192 virtual bool _isValidEnchantmentTypeForCategory(::Enchant::Type type)
const;
199 ::Enchant::Type type,
200 ::Enchant::Frequency frequency,
201 ::std::string_view stringId,
202 ::std::string_view scriptStringId,
203 ::std::string_view description,
204 ::Enchant::VillagerTrading isAvailableForVillagerTraining,
213 MCAPI static ::Enchant::Slot enchantSlotFromString(::std::string_view str);
215 MCAPI
static void initEnchants();
217 MCAPI static ::std::string stringFromEnchantSlot(::Enchant::Slot
const& enchantSlot);
223 MCAPI static ::std::unordered_map<::HashedString, ::Enchant::Type>& mEnchantNameToType();
226 unordered_map<::Enchant::Slot, ::std::string, ::EnchantSlotEnumHasher, ::std::equal_to<::Enchant::Slot>>&
227 mEnchantSlotTypeEnumToStringMap();
229 MCAPI static ::std::unordered_map<::std::string, ::Enchant::Slot>& mEnchantSlotTypeNameToEnumMap();
231 MCAPI static ::std::vector<::std::unique_ptr<::Enchant>>& mEnchants();
238 ::Enchant::Type type,
239 ::Enchant::Frequency frequency,
240 ::std::string_view stringId,
241 ::std::string_view scriptStringId,
242 ::std::string_view description,
243 ::Enchant::VillagerTrading isAvailableForVillagerTraining,
258 MCAPI
bool $isCompatibleWith(::Enchant::Type type)
const;
260 MCAPI
int $getMinCost(
int level)
const;
262 MCAPI
int $getMaxCost(
int level)
const;
264 MCFOLD
int $getMinLevel()
const;
266 MCFOLD
int $getMaxLevel()
const;
270 MCFOLD
float $getAfterBreachArmorFraction(
int,
float)
const;
272 MCFOLD
float $getDamageBonus(
int,
::Actor const&,
::Actor const&)
const;
274 MCFOLD
void $doPostAttack(
::Actor& attacker,
::Actor& victim,
int level)
const;
280 MCFOLD
bool $isMeleeDamageEnchant()
const;
282 MCFOLD
bool $isProtectionEnchant()
const;
284 MCFOLD
bool $isTreasureOnly()
const;
286 MCFOLD
bool $isDiscoverable()
const;
288 MCFOLD
bool $_isValidEnchantmentTypeForCategory(::Enchant::Type type)
const;
294 MCAPI
static void** $vftable();