1use glam :: DVec3 ; use crate :: attribute :: AttributeModifierOperation ; use crate :: enchantment_effect :: { ConditionalDamageImmunityEffect , ConditionalEnchantmentEffect , CrossbowChargingSounds , DamageSourcePredicate , DamageSourceTagPredicate , EnchantmentAttributeEffect , EnchantmentEffectRequirements , EnchantmentEffects , EnchantmentEntityEffect , EnchantmentEntityTarget , EnchantmentItemSet , EnchantmentTarget , EnchantmentValueEffect , EntityFlagsPredicate , EntityPredicate , EntityTypePredicate , EntityTypeSpecificPredicate , EntityVehiclePredicate , LevelBasedValue , MobEffectSelection , PlayerPredicate , TargetedConditionalEnchantmentEffect , } ; use crate :: enchantment :: { Enchantment , EnchantmentCost , EnchantmentRegistry } ; use crate :: equipment :: EquipmentSlotGroup ; use crate :: vanilla_attributes ; use crate :: vanilla_mob_effects ; use simdnbt :: owned :: { NbtCompound , NbtList , NbtTag } ; use steel_utils :: Identifier ; use steel_utils :: types :: GameType ; fn aqua_affinity_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (4.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (4.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:submerged_mining_speed" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.aqua_affinity" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_multiplied_total" . into ())) ; compound })]))) ; compound } } pub static AQUA_AFFINITY : Enchantment = Enchantment { key : Identifier :: vanilla_static ("aqua_affinity") , max_level : 1 , min_cost : EnchantmentCost { base : 1 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 41 , per_level_above_first : 0 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: Head] , supported_items : "#minecraft:enchantable/head_armor" , primary_items : None , exclusive_set : None , effects_nbt : aqua_affinity_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & AQUA_AFFINITY_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_0 , attribute : vanilla_attributes :: SUBMERGED_MINING_SPEED , id : Identifier :: new_static ("minecraft" , "enchantment.aqua_affinity") , operation : AttributeModifierOperation :: AddMultipliedTotal , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn bane_of_arthropods_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.5)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.5)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("#minecraft:sensitive_to_bane_of_arthropods" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound . insert ("minecraft:post_attack" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("affected" , NbtTag :: String ("victim" . into ())) ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("max_amplifier" , NbtTag :: Float (3.0)) ; compound . insert ("max_duration" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.5)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.5)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("min_amplifier" , NbtTag :: Float (3.0)) ; compound . insert ("min_duration" , NbtTag :: Float (1.5)) ; compound . insert ("to_apply" , NbtTag :: String ("minecraft:slowness" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:apply_mob_effect" . into ())) ; compound })) ; compound . insert ("enchanted" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("#minecraft:sensitive_to_bane_of_arthropods" . into ())) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_direct" , NbtTag :: Byte (1i8)) ; compound })) ; compound })]))) ; compound })) ; compound })]))) ; compound } } pub static BANE_OF_ARTHROPODS : Enchantment = Enchantment { key : Identifier :: vanilla_static ("bane_of_arthropods") , max_level : 5 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 25 , per_level_above_first : 8 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/weapon" , primary_items : Some ("#minecraft:enchantable/melee_weapon") , exclusive_set : Some ("#minecraft:exclusive_set/damage") , effects_nbt : bane_of_arthropods_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & BANE_OF_ARTHROPODS_DAMAGE_0_LEVEL_VALUE_1 } , requirements : Some (& BANE_OF_ARTHROPODS_DAMAGE_0_REQUIREMENTS_2) , }] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [TargetedConditionalEnchantmentEffect { effect : EnchantmentEntityEffect :: ApplyMobEffect { to_apply : MobEffectSelection :: Single (vanilla_mob_effects :: SLOWNESS) , min_duration : & BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_3 , max_duration : & BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_4 , min_amplifier : & BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_5 , max_amplifier : & BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_6 , } , enchanted : EnchantmentTarget :: Attacker , affected : EnchantmentTarget :: Victim , requirements : Some (& BANE_OF_ARTHROPODS_POST_ATTACK_0_REQUIREMENTS_7) , }] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn binding_curse_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:prevent_armor_change" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound })) ; compound } } pub static BINDING_CURSE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("binding_curse") , max_level : 1 , min_cost : EnchantmentCost { base : 25 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: Armor] , supported_items : "#minecraft:enchantable/equippable" , primary_items : None , exclusive_set : None , effects_nbt : binding_curse_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : true , trident_spin_attack_strength : None , } , } ; fn blast_protection_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.15)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.15)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:explosion_knockback_resistance" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.blast_protection" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound })]))) ; compound . insert ("minecraft:damage_protection" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("tags" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (1i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:is_explosion" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (0i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:bypasses_invulnerability" . into ())) ; compound })]))) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static BLAST_PROTECTION : Enchantment = Enchantment { key : Identifier :: vanilla_static ("blast_protection") , max_level : 4 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 13 , per_level_above_first : 8 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: Armor] , supported_items : "#minecraft:enchantable/armor" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/armor") , effects_nbt : blast_protection_effects_nbt , effects : EnchantmentEffects { damage_protection : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & BLAST_PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_10 } , requirements : Some (& BLAST_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_11) , }] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & BLAST_PROTECTION_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_12 , attribute : vanilla_attributes :: EXPLOSION_KNOCKBACK_RESISTANCE , id : Identifier :: new_static ("minecraft" , "enchantment.blast_protection") , operation : AttributeModifierOperation :: AddValue , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn breach_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:armor_effectiveness" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (- 0.15)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (- 0.15)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static BREACH : Enchantment = Enchantment { key : Identifier :: vanilla_static ("breach") , max_level : 4 , min_cost : EnchantmentCost { base : 15 , per_level_above_first : 9 } , max_cost : EnchantmentCost { base : 65 , per_level_above_first : 9 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/mace" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/damage") , effects_nbt : breach_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & BREACH_ARMOR_EFFECTIVENESS_0_LEVEL_VALUE_13 } , requirements : None , }] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn channeling_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:hit_block" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effects" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("entity" , NbtTag :: String ("minecraft:lightning_bolt" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:summon_entity" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("pitch" , NbtTag :: Float (1.0)) ; compound . insert ("sound" , NbtTag :: String ("minecraft:item.trident.thunder" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:play_sound" . into ())) ; compound . insert ("volume" , NbtTag :: Float (5.0)) ; compound })]))) ; compound . insert ("type" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:weather_check" . into ())) ; compound . insert ("thundering" , NbtTag :: Byte (1i8)) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("minecraft:trident" . into ())) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:location_check" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("blocks" , NbtTag :: String ("#minecraft:lightning_rods" . into ())) ; compound })) ; compound . insert ("can_see_sky" , NbtTag :: Byte (1i8)) ; compound })) ; compound })]))) ; compound })) ; compound })]))) ; compound . insert ("minecraft:post_attack" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("affected" , NbtTag :: String ("victim" . into ())) ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effects" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("entity" , NbtTag :: String ("minecraft:lightning_bolt" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:summon_entity" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("pitch" , NbtTag :: Float (1.0)) ; compound . insert ("sound" , NbtTag :: String ("minecraft:item.trident.thunder" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:play_sound" . into ())) ; compound . insert ("volume" , NbtTag :: Float (5.0)) ; compound })]))) ; compound . insert ("type" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound })) ; compound . insert ("enchanted" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:weather_check" . into ())) ; compound . insert ("thundering" , NbtTag :: Byte (1i8)) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:location" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("can_see_sky" , NbtTag :: Byte (1i8)) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("direct_attacker" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("minecraft:trident" . into ())) ; compound })) ; compound })]))) ; compound })) ; compound })]))) ; compound } } pub static CHANNELING : Enchantment = Enchantment { key : Identifier :: vanilla_static ("channeling") , max_level : 1 , min_cost : EnchantmentCost { base : 25 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/trident" , primary_items : None , exclusive_set : None , effects_nbt : channeling_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [TargetedConditionalEnchantmentEffect { effect : EnchantmentEntityEffect :: AllOf (& [& CHANNELING_POST_ATTACK_0_ENTITY_EFFECT_14 , & CHANNELING_POST_ATTACK_0_ENTITY_EFFECT_15]) , enchanted : EnchantmentTarget :: Attacker , affected : EnchantmentTarget :: Victim , requirements : Some (& CHANNELING_POST_ATTACK_0_REQUIREMENTS_16) , }] , post_piercing_attack : & [] , hit_block : true , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn density_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:smash_damage_per_fallen_block" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.5)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.5)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static DENSITY : Enchantment = Enchantment { key : Identifier :: vanilla_static ("density") , max_level : 5 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 25 , per_level_above_first : 8 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/mace" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/damage") , effects_nbt : density_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & DENSITY_SMASH_DAMAGE_PER_FALLEN_BLOCK_0_LEVEL_VALUE_20 } , requirements : None , }] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn depth_strider_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.33333334)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.33333334)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:water_movement_efficiency" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.depth_strider" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound })]))) ; compound } } pub static DEPTH_STRIDER : Enchantment = Enchantment { key : Identifier :: vanilla_static ("depth_strider") , max_level : 3 , min_cost : EnchantmentCost { base : 10 , per_level_above_first : 10 } , max_cost : EnchantmentCost { base : 25 , per_level_above_first : 10 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: Feet] , supported_items : "#minecraft:enchantable/foot_armor" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/boots") , effects_nbt : depth_strider_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & DEPTH_STRIDER_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_21 , attribute : vanilla_attributes :: WATER_MOVEMENT_EFFICIENCY , id : Identifier :: new_static ("minecraft" , "enchantment.depth_strider") , operation : AttributeModifierOperation :: AddValue , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn efficiency_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("added" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:levels_squared" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:mining_efficiency" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.efficiency" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound })]))) ; compound } } pub static EFFICIENCY : Enchantment = Enchantment { key : Identifier :: vanilla_static ("efficiency") , max_level : 5 , min_cost : EnchantmentCost { base : 1 , per_level_above_first : 10 } , max_cost : EnchantmentCost { base : 51 , per_level_above_first : 10 } , anvil_cost : 1 , weight : 10 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/mining" , primary_items : None , exclusive_set : None , effects_nbt : efficiency_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & EFFICIENCY_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_22 , attribute : vanilla_attributes :: MINING_EFFICIENCY , id : Identifier :: new_static ("minecraft" , "enchantment.efficiency") , operation : AttributeModifierOperation :: AddValue , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn feather_falling_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage_protection" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (3.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (3.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("tags" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (1i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:is_fall" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (0i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:bypasses_invulnerability" . into ())) ; compound })]))) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static FEATHER_FALLING : Enchantment = Enchantment { key : Identifier :: vanilla_static ("feather_falling") , max_level : 4 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 6 } , max_cost : EnchantmentCost { base : 11 , per_level_above_first : 6 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: Armor] , supported_items : "#minecraft:enchantable/foot_armor" , primary_items : None , exclusive_set : None , effects_nbt : feather_falling_effects_nbt , effects : EnchantmentEffects { damage_protection : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & FEATHER_FALLING_DAMAGE_PROTECTION_0_LEVEL_VALUE_23 } , requirements : Some (& FEATHER_FALLING_DAMAGE_PROTECTION_0_REQUIREMENTS_24) , }] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn fire_aspect_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:post_attack" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("affected" , NbtTag :: String ("victim" . into ())) ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("duration" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (4.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (4.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:ignite" . into ())) ; compound })) ; compound . insert ("enchanted" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_direct" , NbtTag :: Byte (1i8)) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static FIRE_ASPECT : Enchantment = Enchantment { key : Identifier :: vanilla_static ("fire_aspect") , max_level : 2 , min_cost : EnchantmentCost { base : 10 , per_level_above_first : 20 } , max_cost : EnchantmentCost { base : 60 , per_level_above_first : 20 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/fire_aspect" , primary_items : Some ("#minecraft:enchantable/melee_weapon") , exclusive_set : None , effects_nbt : fire_aspect_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [TargetedConditionalEnchantmentEffect { effect : EnchantmentEntityEffect :: Ignite { duration : & FIRE_ASPECT_POST_ATTACK_0_LEVEL_VALUE_25 } , enchanted : EnchantmentTarget :: Attacker , affected : EnchantmentTarget :: Victim , requirements : Some (& FIRE_ASPECT_POST_ATTACK_0_REQUIREMENTS_26) , }] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn fire_protection_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (- 0.15)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (- 0.15)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:burning_time" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.fire_protection" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_multiplied_base" . into ())) ; compound })]))) ; compound . insert ("minecraft:damage_protection" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("tags" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (1i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:is_fire" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (0i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:bypasses_invulnerability" . into ())) ; compound })]))) ; compound })) ; compound })]))) ; compound })) ; compound })]))) ; compound } } pub static FIRE_PROTECTION : Enchantment = Enchantment { key : Identifier :: vanilla_static ("fire_protection") , max_level : 4 , min_cost : EnchantmentCost { base : 10 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 18 , per_level_above_first : 8 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: Armor] , supported_items : "#minecraft:enchantable/armor" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/armor") , effects_nbt : fire_protection_effects_nbt , effects : EnchantmentEffects { damage_protection : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & FIRE_PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_27 } , requirements : Some (& FIRE_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_28) , }] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & FIRE_PROTECTION_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_30 , attribute : vanilla_attributes :: BURNING_TIME , id : Identifier :: new_static ("minecraft" , "enchantment.fire_protection") , operation : AttributeModifierOperation :: AddMultipliedBase , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn flame_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:projectile_spawned" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("duration" , NbtTag :: Float (100.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:ignite" . into ())) ; compound })) ; compound })]))) ; compound } } pub static FLAME : Enchantment = Enchantment { key : Identifier :: vanilla_static ("flame") , max_level : 1 , min_cost : EnchantmentCost { base : 20 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/bow" , primary_items : None , exclusive_set : None , effects_nbt : flame_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [ConditionalEnchantmentEffect { effect : EnchantmentEntityEffect :: Ignite { duration : & FLAME_PROJECTILE_SPAWNED_0_LEVEL_VALUE_31 } , requirements : None , }] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn fortune_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound } } pub static FORTUNE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("fortune") , max_level : 3 , min_cost : EnchantmentCost { base : 15 , per_level_above_first : 9 } , max_cost : EnchantmentCost { base : 65 , per_level_above_first : 9 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/mining_loot" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/mining") , effects_nbt : fortune_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn frost_walker_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage_immunity" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("tags" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (1i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:burn_from_stepping" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (0i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:bypasses_invulnerability" . into ())) ; compound })]))) ; compound })) ; compound })) ; compound })]))) ; compound . insert ("minecraft:location_changed" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block_state" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("state" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("Name" , NbtTag :: String ("minecraft:frosted_ice" . into ())) ; compound . insert ("Properties" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("age" , NbtTag :: String ("0" . into ())) ; compound })) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:simple_state_provider" . into ())) ; compound })) ; compound . insert ("height" , NbtTag :: Float (1.0)) ; compound . insert ("offset" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Int (0) , NbtTag :: Int (- 1) , NbtTag :: Int (0)]))) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("predicates" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("offset" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Int (0) , NbtTag :: Int (1) , NbtTag :: Int (0)]))) ; compound . insert ("tag" , NbtTag :: String ("minecraft:air" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:matching_block_tag" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("blocks" , NbtTag :: String ("minecraft:water" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:matching_blocks" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("fluids" , NbtTag :: String ("minecraft:water" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:matching_fluids" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:unobstructed" . into ())) ; compound })]))) ; compound . insert ("type" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound })) ; compound . insert ("radius" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("max" , NbtTag :: Float (16.0)) ; compound . insert ("min" , NbtTag :: Float (0.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:clamped" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (3.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("trigger_game_event" , NbtTag :: String ("minecraft:block_place" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:replace_disk" . into ())) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_on_ground" , NbtTag :: Byte (1i8)) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:inverted" . into ())) ; compound . insert ("term" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:vehicle" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound })) ; compound })) ; compound })) ; compound })]))) ; compound })) ; compound })]))) ; compound } } pub static FROST_WALKER : Enchantment = Enchantment { key : Identifier :: vanilla_static ("frost_walker") , max_level : 2 , min_cost : EnchantmentCost { base : 10 , per_level_above_first : 10 } , max_cost : EnchantmentCost { base : 25 , per_level_above_first : 10 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: Feet] , supported_items : "#minecraft:enchantable/foot_armor" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/boots") , effects_nbt : frost_walker_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [ConditionalDamageImmunityEffect { requirements : Some (& FROST_WALKER_DAMAGE_IMMUNITY_0_REQUIREMENTS_32) , }] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : true , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn impaling_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.5)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.5)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("#minecraft:sensitive_to_impaling" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static IMPALING : Enchantment = Enchantment { key : Identifier :: vanilla_static ("impaling") , max_level : 5 , min_cost : EnchantmentCost { base : 1 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 21 , per_level_above_first : 8 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/trident" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/damage") , effects_nbt : impaling_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & IMPALING_DAMAGE_0_LEVEL_VALUE_33 } , requirements : Some (& IMPALING_DAMAGE_0_REQUIREMENTS_34) , }] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn infinity_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:ammo_use" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:set" . into ())) ; compound . insert ("value" , NbtTag :: Float (0.0)) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:match_tool" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("items" , NbtTag :: String ("minecraft:arrow" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static INFINITY : Enchantment = Enchantment { key : Identifier :: vanilla_static ("infinity") , max_level : 1 , min_cost : EnchantmentCost { base : 20 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/bow" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/bow") , effects_nbt : infinity_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Set { value : & INFINITY_AMMO_USE_0_LEVEL_VALUE_35 } , requirements : Some (& INFINITY_AMMO_USE_0_REQUIREMENTS_36) , }] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn knockback_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:knockback" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static KNOCKBACK : Enchantment = Enchantment { key : Identifier :: vanilla_static ("knockback") , max_level : 2 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 20 } , max_cost : EnchantmentCost { base : 55 , per_level_above_first : 20 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/melee_weapon" , primary_items : None , exclusive_set : None , effects_nbt : knockback_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & KNOCKBACK_KNOCKBACK_0_LEVEL_VALUE_37 } , requirements : None , }] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn looting_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:equipment_drops" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.01)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.01)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("enchanted" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("minecraft:player" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static LOOTING : Enchantment = Enchantment { key : Identifier :: vanilla_static ("looting") , max_level : 3 , min_cost : EnchantmentCost { base : 15 , per_level_above_first : 9 } , max_cost : EnchantmentCost { base : 65 , per_level_above_first : 9 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/melee_weapon" , primary_items : None , exclusive_set : None , effects_nbt : looting_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [TargetedConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & LOOTING_EQUIPMENT_DROPS_0_LEVEL_VALUE_38 } , enchanted : EnchantmentTarget :: Attacker , affected : EnchantmentTarget :: Victim , requirements : Some (& LOOTING_EQUIPMENT_DROPS_0_REQUIREMENTS_39) , }] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn loyalty_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:trident_return_acceleration" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static LOYALTY : Enchantment = Enchantment { key : Identifier :: vanilla_static ("loyalty") , max_level : 3 , min_cost : EnchantmentCost { base : 12 , per_level_above_first : 7 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/trident" , primary_items : None , exclusive_set : None , effects_nbt : loyalty_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & LOYALTY_TRIDENT_RETURN_ACCELERATION_0_LEVEL_VALUE_40 } , requirements : None , }] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn luck_of_the_sea_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:fishing_luck_bonus" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static LUCK_OF_THE_SEA : Enchantment = Enchantment { key : Identifier :: vanilla_static ("luck_of_the_sea") , max_level : 3 , min_cost : EnchantmentCost { base : 15 , per_level_above_first : 9 } , max_cost : EnchantmentCost { base : 65 , per_level_above_first : 9 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/fishing" , primary_items : None , exclusive_set : None , effects_nbt : luck_of_the_sea_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & LUCK_OF_THE_SEA_FISHING_LUCK_BONUS_0_LEVEL_VALUE_41 } , requirements : None , }] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn lunge_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:post_piercing_attack" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effects" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:change_item_damage" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (4.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (4.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:apply_exhaustion" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("coordinate_scale" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Double (1.0) , NbtTag :: Double (0.0) , NbtTag :: Double (1.0)]))) ; compound . insert ("direction" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Double (0.0) , NbtTag :: Double (0.0) , NbtTag :: Double (1.0)]))) ; compound . insert ("magnitude" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.458)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.458)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:apply_impulse" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("pitch" , NbtTag :: Float (1.0)) ; compound . insert ("sound" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: String ("minecraft:item.spear.lunge_1" . into ()) , NbtTag :: String ("minecraft:item.spear.lunge_2" . into ()) , NbtTag :: String ("minecraft:item.spear.lunge_3" . into ())]))) ; compound . insert ("type" , NbtTag :: String ("minecraft:play_sound" . into ())) ; compound . insert ("volume" , NbtTag :: Float (1.0)) ; compound })]))) ; compound . insert ("type" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:inverted" . into ())) ; compound . insert ("term" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:vehicle" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound })) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_fall_flying" , NbtTag :: Byte (0i8)) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_in_water" , NbtTag :: Byte (0i8)) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:any_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:inverted" . into ())) ; compound . insert ("term" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:type_specific/player" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound })) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:type_specific/player" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("gamemode" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: String ("creative" . into ())]))) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:type_specific/player" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("food" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("level" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("min" , NbtTag :: Int (7)) ; compound })) ; compound })) ; compound })) ; compound })) ; compound })]))) ; compound })]))) ; compound })) ; compound })]))) ; compound } } pub static LUNGE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("lunge") , max_level : 3 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 25 , per_level_above_first : 8 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: Hand] , supported_items : "#minecraft:enchantable/lunge" , primary_items : None , exclusive_set : None , effects_nbt : lunge_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [ConditionalEnchantmentEffect { effect : EnchantmentEntityEffect :: AllOf (& [& LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_42 , & LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_44 , & LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_46 , & LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_48]) , requirements : Some (& LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_49) , }] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn lure_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:fishing_time_reduction" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (5.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (5.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static LURE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("lure") , max_level : 3 , min_cost : EnchantmentCost { base : 15 , per_level_above_first : 9 } , max_cost : EnchantmentCost { base : 65 , per_level_above_first : 9 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/fishing" , primary_items : None , exclusive_set : None , effects_nbt : lure_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & LURE_FISHING_TIME_REDUCTION_0_LEVEL_VALUE_59 } , requirements : None , }] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn mending_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:repair_with_xp" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("factor" , NbtTag :: Float (2.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:multiply" . into ())) ; compound })) ; compound })]))) ; compound } } pub static MENDING : Enchantment = Enchantment { key : Identifier :: vanilla_static ("mending") , max_level : 1 , min_cost : EnchantmentCost { base : 25 , per_level_above_first : 25 } , max_cost : EnchantmentCost { base : 75 , per_level_above_first : 25 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: Any] , supported_items : "#minecraft:enchantable/durability" , primary_items : None , exclusive_set : None , effects_nbt : mending_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Multiply { factor : & MENDING_REPAIR_WITH_XP_0_LEVEL_VALUE_60 } , requirements : None , }] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn multishot_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:projectile_count" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound . insert ("minecraft:projectile_spread" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (10.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (10.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static MULTISHOT : Enchantment = Enchantment { key : Identifier :: vanilla_static ("multishot") , max_level : 1 , min_cost : EnchantmentCost { base : 20 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/crossbow" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/crossbow") , effects_nbt : multishot_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & MULTISHOT_PROJECTILE_SPREAD_0_LEVEL_VALUE_61 } , requirements : None , }] , projectile_count : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & MULTISHOT_PROJECTILE_COUNT_0_LEVEL_VALUE_62 } , requirements : None , }] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn piercing_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:projectile_piercing" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static PIERCING : Enchantment = Enchantment { key : Identifier :: vanilla_static ("piercing") , max_level : 4 , min_cost : EnchantmentCost { base : 1 , per_level_above_first : 10 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 1 , weight : 10 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/crossbow" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/crossbow") , effects_nbt : piercing_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & PIERCING_PROJECTILE_PIERCING_0_LEVEL_VALUE_63 } , requirements : None , }] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn power_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.5)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("direct_attacker" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("#minecraft:arrows" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static POWER : Enchantment = Enchantment { key : Identifier :: vanilla_static ("power") , max_level : 5 , min_cost : EnchantmentCost { base : 1 , per_level_above_first : 10 } , max_cost : EnchantmentCost { base : 16 , per_level_above_first : 10 } , anvil_cost : 1 , weight : 10 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/bow" , primary_items : None , exclusive_set : None , effects_nbt : power_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & POWER_DAMAGE_0_LEVEL_VALUE_64 } , requirements : Some (& POWER_DAMAGE_0_REQUIREMENTS_65) , }] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn projectile_protection_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage_protection" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("tags" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (1i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:is_projectile" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (0i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:bypasses_invulnerability" . into ())) ; compound })]))) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static PROJECTILE_PROTECTION : Enchantment = Enchantment { key : Identifier :: vanilla_static ("projectile_protection") , max_level : 4 , min_cost : EnchantmentCost { base : 3 , per_level_above_first : 6 } , max_cost : EnchantmentCost { base : 9 , per_level_above_first : 6 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: Armor] , supported_items : "#minecraft:enchantable/armor" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/armor") , effects_nbt : projectile_protection_effects_nbt , effects : EnchantmentEffects { damage_protection : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & PROJECTILE_PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_66 } , requirements : Some (& PROJECTILE_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_67) , }] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn protection_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage_protection" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:damage_source_properties" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("tags" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("expected" , NbtTag :: Byte (0i8)) ; compound . insert ("id" , NbtTag :: String ("minecraft:bypasses_invulnerability" . into ())) ; compound })]))) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static PROTECTION : Enchantment = Enchantment { key : Identifier :: vanilla_static ("protection") , max_level : 4 , min_cost : EnchantmentCost { base : 1 , per_level_above_first : 11 } , max_cost : EnchantmentCost { base : 12 , per_level_above_first : 11 } , anvil_cost : 1 , weight : 10 , slots : & [EquipmentSlotGroup :: Armor] , supported_items : "#minecraft:enchantable/armor" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/armor") , effects_nbt : protection_effects_nbt , effects : EnchantmentEffects { damage_protection : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_68 } , requirements : Some (& PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_69) , }] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn punch_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:knockback" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("direct_attacker" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("#minecraft:arrows" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static PUNCH : Enchantment = Enchantment { key : Identifier :: vanilla_static ("punch") , max_level : 2 , min_cost : EnchantmentCost { base : 12 , per_level_above_first : 20 } , max_cost : EnchantmentCost { base : 37 , per_level_above_first : 20 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/bow" , primary_items : None , exclusive_set : None , effects_nbt : punch_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & PUNCH_KNOCKBACK_0_LEVEL_VALUE_70 } , requirements : Some (& PUNCH_KNOCKBACK_0_REQUIREMENTS_71) , }] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn quick_charge_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:crossbow_charge_time" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (- 0.25)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (- 0.25)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("minecraft:crossbow_charging_sounds" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("end" , NbtTag :: String ("minecraft:item.crossbow.loading_end" . into ())) ; compound . insert ("start" , NbtTag :: String ("minecraft:item.crossbow.quick_charge_1" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("end" , NbtTag :: String ("minecraft:item.crossbow.loading_end" . into ())) ; compound . insert ("start" , NbtTag :: String ("minecraft:item.crossbow.quick_charge_2" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("end" , NbtTag :: String ("minecraft:item.crossbow.loading_end" . into ())) ; compound . insert ("start" , NbtTag :: String ("minecraft:item.crossbow.quick_charge_3" . into ())) ; compound })]))) ; compound } } pub static QUICK_CHARGE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("quick_charge") , max_level : 3 , min_cost : EnchantmentCost { base : 12 , per_level_above_first : 20 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: MainHand , EquipmentSlotGroup :: OffHand] , supported_items : "#minecraft:enchantable/crossbow" , primary_items : None , exclusive_set : None , effects_nbt : quick_charge_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : Some (EnchantmentValueEffect :: Add { value : & QUICK_CHARGE_CROSSBOW_CHARGE_TIME_LEVEL_VALUE_72 }) , crossbow_charging_sounds : & [CrossbowChargingSounds { start : Some (& crate :: sound_events :: ITEM_CROSSBOW_QUICK_CHARGE_1) , mid : None , end : Some (& crate :: sound_events :: ITEM_CROSSBOW_LOADING_END) , } , CrossbowChargingSounds { start : Some (& crate :: sound_events :: ITEM_CROSSBOW_QUICK_CHARGE_2) , mid : None , end : Some (& crate :: sound_events :: ITEM_CROSSBOW_LOADING_END) , } , CrossbowChargingSounds { start : Some (& crate :: sound_events :: ITEM_CROSSBOW_QUICK_CHARGE_3) , mid : None , end : Some (& crate :: sound_events :: ITEM_CROSSBOW_LOADING_END) , }] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn respiration_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:oxygen_bonus" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.respiration" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound })]))) ; compound } } pub static RESPIRATION : Enchantment = Enchantment { key : Identifier :: vanilla_static ("respiration") , max_level : 3 , min_cost : EnchantmentCost { base : 10 , per_level_above_first : 10 } , max_cost : EnchantmentCost { base : 40 , per_level_above_first : 10 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: Head] , supported_items : "#minecraft:enchantable/head_armor" , primary_items : None , exclusive_set : None , effects_nbt : respiration_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & RESPIRATION_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_73 , attribute : vanilla_attributes :: OXYGEN_BONUS , id : Identifier :: new_static ("minecraft" , "enchantment.respiration") , operation : AttributeModifierOperation :: AddValue , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn riptide_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:trident_sound" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: String ("minecraft:item.trident.riptide_1" . into ()) , NbtTag :: String ("minecraft:item.trident.riptide_2" . into ()) , NbtTag :: String ("minecraft:item.trident.riptide_3" . into ())]))) ; compound . insert ("minecraft:trident_spin_attack_strength" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.5)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.75)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound } } pub static RIPTIDE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("riptide") , max_level : 3 , min_cost : EnchantmentCost { base : 17 , per_level_above_first : 7 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: Hand] , supported_items : "#minecraft:enchantable/trident" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/riptide") , effects_nbt : riptide_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [& crate :: sound_events :: ITEM_TRIDENT_RIPTIDE_1 , & crate :: sound_events :: ITEM_TRIDENT_RIPTIDE_2 , & crate :: sound_events :: ITEM_TRIDENT_RIPTIDE_3] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : Some (EnchantmentValueEffect :: Add { value : & RIPTIDE_TRIDENT_SPIN_ATTACK_STRENGTH_LEVEL_VALUE_74 }) , } , } ; fn sharpness_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.5)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static SHARPNESS : Enchantment = Enchantment { key : Identifier :: vanilla_static ("sharpness") , max_level : 5 , min_cost : EnchantmentCost { base : 1 , per_level_above_first : 11 } , max_cost : EnchantmentCost { base : 21 , per_level_above_first : 11 } , anvil_cost : 1 , weight : 10 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/sharp_weapon" , primary_items : Some ("#minecraft:enchantable/melee_weapon") , exclusive_set : Some ("#minecraft:exclusive_set/damage") , effects_nbt : sharpness_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & SHARPNESS_DAMAGE_0_LEVEL_VALUE_75 } , requirements : None , }] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn silk_touch_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:block_experience" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:set" . into ())) ; compound . insert ("value" , NbtTag :: Float (0.0)) ; compound })) ; compound })]))) ; compound } } pub static SILK_TOUCH : Enchantment = Enchantment { key : Identifier :: vanilla_static ("silk_touch") , max_level : 1 , min_cost : EnchantmentCost { base : 15 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 65 , per_level_above_first : 0 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/mining_loot" , primary_items : None , exclusive_set : Some ("#minecraft:exclusive_set/mining") , effects_nbt : silk_touch_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Set { value : & SILK_TOUCH_BLOCK_EXPERIENCE_0_LEVEL_VALUE_76 } , requirements : None , }] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn smite_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:damage" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:add" . into ())) ; compound . insert ("value" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.5)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.5)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:entity_type" , NbtTag :: String ("#minecraft:sensitive_to_smite" . into ())) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static SMITE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("smite") , max_level : 5 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 25 , per_level_above_first : 8 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/weapon" , primary_items : Some ("#minecraft:enchantable/melee_weapon") , exclusive_set : Some ("#minecraft:exclusive_set/damage") , effects_nbt : smite_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: Add { value : & SMITE_DAMAGE_0_LEVEL_VALUE_77 } , requirements : Some (& SMITE_DAMAGE_0_REQUIREMENTS_78) , }] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn soul_speed_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:location_changed" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effects" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.0405)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.0105)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:movement_speed" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.soul_speed" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:attribute" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Float (1.0)) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:movement_efficiency" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.soul_speed" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:attribute" . into ())) ; compound })]))) ; compound . insert ("type" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:inverted" . into ())) ; compound . insert ("term" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:vehicle" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound })) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:any_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("active" , NbtTag :: Byte (1i8)) ; compound . insert ("condition" , NbtTag :: String ("minecraft:enchantment_active_check" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_flying" , NbtTag :: Byte (0i8)) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:any_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:movement_affected_by" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("blocks" , NbtTag :: String ("#minecraft:soul_speed_blocks" . into ())) ; compound })) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_on_ground" , NbtTag :: Byte (0i8)) ; compound })) ; compound })) ; compound })]))) ; compound })]))) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("active" , NbtTag :: Byte (0i8)) ; compound . insert ("condition" , NbtTag :: String ("minecraft:enchantment_active_check" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_flying" , NbtTag :: Byte (0i8)) ; compound })) ; compound . insert ("minecraft:movement_affected_by" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("blocks" , NbtTag :: String ("#minecraft:soul_speed_blocks" . into ())) ; compound })) ; compound })) ; compound })) ; compound })]))) ; compound })]))) ; compound })]))) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:change_item_damage" . into ())) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("chance" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Float (0.04)) ; compound . insert ("type" , NbtTag :: String ("minecraft:enchantment_level" . into ())) ; compound })) ; compound . insert ("condition" , NbtTag :: String ("minecraft:random_chance" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_on_ground" , NbtTag :: Byte (1i8)) ; compound })) ; compound . insert ("minecraft:movement_affected_by" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("blocks" , NbtTag :: String ("#minecraft:soul_speed_blocks" . into ())) ; compound })) ; compound })) ; compound })) ; compound })]))) ; compound })) ; compound })]))) ; compound . insert ("minecraft:tick" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("horizontal_position" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("in_bounding_box" . into ())) ; compound })) ; compound . insert ("horizontal_velocity" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("movement_scale" , NbtTag :: Float (- 0.2)) ; compound })) ; compound . insert ("particle" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:soul" . into ())) ; compound })) ; compound . insert ("speed" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:spawn_particles" . into ())) ; compound . insert ("vertical_position" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("offset" , NbtTag :: Float (0.1)) ; compound . insert ("type" , NbtTag :: String ("entity_position" . into ())) ; compound })) ; compound . insert ("vertical_velocity" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.1)) ; compound })) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_flying" , NbtTag :: Byte (0i8)) ; compound . insert ("is_on_ground" , NbtTag :: Byte (1i8)) ; compound })) ; compound . insert ("minecraft:movement" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("horizontal_speed" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("min" , NbtTag :: Double (0.000009999999747378752)) ; compound })) ; compound })) ; compound . insert ("minecraft:movement_affected_by" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("blocks" , NbtTag :: String ("#minecraft:soul_speed_blocks" . into ())) ; compound })) ; compound })) ; compound . insert ("minecraft:periodic_tick" , NbtTag :: Int (5)) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("pitch" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("max_exclusive" , NbtTag :: Float (1.0)) ; compound . insert ("min_inclusive" , NbtTag :: Float (0.6)) ; compound . insert ("type" , NbtTag :: String ("minecraft:uniform" . into ())) ; compound })) ; compound . insert ("sound" , NbtTag :: String ("minecraft:particle.soul_escape" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:play_sound" . into ())) ; compound . insert ("volume" , NbtTag :: Float (0.6)) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound . insert ("terms" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("chance" , NbtTag :: Float (0.35)) ; compound . insert ("condition" , NbtTag :: String ("minecraft:random_chance" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("this" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_flying" , NbtTag :: Byte (0i8)) ; compound . insert ("is_on_ground" , NbtTag :: Byte (1i8)) ; compound })) ; compound . insert ("minecraft:movement" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("horizontal_speed" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("min" , NbtTag :: Double (0.000009999999747378752)) ; compound })) ; compound })) ; compound . insert ("minecraft:movement_affected_by" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("blocks" , NbtTag :: String ("#minecraft:soul_speed_blocks" . into ())) ; compound })) ; compound })) ; compound . insert ("minecraft:periodic_tick" , NbtTag :: Int (5)) ; compound })) ; compound })]))) ; compound })) ; compound })]))) ; compound } } pub static SOUL_SPEED : Enchantment = Enchantment { key : Identifier :: vanilla_static ("soul_speed") , max_level : 3 , min_cost : EnchantmentCost { base : 10 , per_level_above_first : 10 } , max_cost : EnchantmentCost { base : 25 , per_level_above_first : 10 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: Feet] , supported_items : "#minecraft:enchantable/foot_armor" , primary_items : None , exclusive_set : None , effects_nbt : soul_speed_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : true , tick : true , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn sweeping_edge_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("denominator" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("numerator" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:fraction" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:sweeping_damage_ratio" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.sweeping_edge" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound })]))) ; compound } } pub static SWEEPING_EDGE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("sweeping_edge") , max_level : 3 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 9 } , max_cost : EnchantmentCost { base : 20 , per_level_above_first : 9 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/sweeping" , primary_items : None , exclusive_set : None , effects_nbt : sweeping_edge_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & SWEEPING_EDGE_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_79 , attribute : vanilla_attributes :: SWEEPING_DAMAGE_RATIO , id : Identifier :: new_static ("minecraft" , "enchantment.sweeping_edge") , operation : AttributeModifierOperation :: AddValue , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn swift_sneak_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:attributes" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.15)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.15)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("attribute" , NbtTag :: String ("minecraft:sneaking_speed" . into ())) ; compound . insert ("id" , NbtTag :: String ("minecraft:enchantment.swift_sneak" . into ())) ; compound . insert ("operation" , NbtTag :: String ("add_value" . into ())) ; compound })]))) ; compound } } pub static SWIFT_SNEAK : Enchantment = Enchantment { key : Identifier :: vanilla_static ("swift_sneak") , max_level : 3 , min_cost : EnchantmentCost { base : 25 , per_level_above_first : 25 } , max_cost : EnchantmentCost { base : 75 , per_level_above_first : 25 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: Legs] , supported_items : "#minecraft:enchantable/leg_armor" , primary_items : None , exclusive_set : None , effects_nbt : swift_sneak_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [EnchantmentAttributeEffect { amount : & SWIFT_SNEAK_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_82 , attribute : vanilla_attributes :: SNEAKING_SPEED , id : Identifier :: new_static ("minecraft" , "enchantment.swift_sneak") , operation : AttributeModifierOperation :: AddValue , }] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn thorns_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:post_attack" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("affected" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effects" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("damage_type" , NbtTag :: String ("minecraft:thorns" . into ())) ; compound . insert ("max_damage" , NbtTag :: Float (5.0)) ; compound . insert ("min_damage" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:damage_entity" . into ())) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Float (2.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:change_item_damage" . into ())) ; compound })]))) ; compound . insert ("type" , NbtTag :: String ("minecraft:all_of" . into ())) ; compound })) ; compound . insert ("enchanted" , NbtTag :: String ("victim" . into ())) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("chance" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("amount" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (0.15)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.15)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:enchantment_level" . into ())) ; compound })) ; compound . insert ("condition" , NbtTag :: String ("minecraft:random_chance" . into ())) ; compound })) ; compound })]))) ; compound } } pub static THORNS : Enchantment = Enchantment { key : Identifier :: vanilla_static ("thorns") , max_level : 3 , min_cost : EnchantmentCost { base : 10 , per_level_above_first : 20 } , max_cost : EnchantmentCost { base : 60 , per_level_above_first : 20 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: Any] , supported_items : "#minecraft:enchantable/armor" , primary_items : Some ("#minecraft:enchantable/chest_armor") , exclusive_set : None , effects_nbt : thorns_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [TargetedConditionalEnchantmentEffect { effect : EnchantmentEntityEffect :: AllOf (& [& THORNS_POST_ATTACK_0_ENTITY_EFFECT_83 , & THORNS_POST_ATTACK_0_ENTITY_EFFECT_86]) , enchanted : EnchantmentTarget :: Victim , affected : EnchantmentTarget :: Attacker , requirements : Some (& THORNS_POST_ATTACK_0_REQUIREMENTS_88) , }] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn unbreaking_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:item_damage" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("chance" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("denominator" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (10.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (5.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("numerator" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (2.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:fraction" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:remove_binomial" . into ())) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:match_tool" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("items" , NbtTag :: String ("#minecraft:enchantable/armor" . into ())) ; compound })) ; compound })) ; compound }) , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("chance" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("denominator" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (2.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("numerator" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.0)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (1.0)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:fraction" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:remove_binomial" . into ())) ; compound })) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:inverted" . into ())) ; compound . insert ("term" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:match_tool" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("items" , NbtTag :: String ("#minecraft:enchantable/armor" . into ())) ; compound })) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static UNBREAKING : Enchantment = Enchantment { key : Identifier :: vanilla_static ("unbreaking") , max_level : 3 , min_cost : EnchantmentCost { base : 5 , per_level_above_first : 8 } , max_cost : EnchantmentCost { base : 55 , per_level_above_first : 8 } , anvil_cost : 2 , weight : 5 , slots : & [EquipmentSlotGroup :: Any] , supported_items : "#minecraft:enchantable/durability" , primary_items : None , exclusive_set : None , effects_nbt : unbreaking_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: RemoveBinomial { chance : & UNBREAKING_ITEM_DAMAGE_0_LEVEL_VALUE_90 } , requirements : Some (& UNBREAKING_ITEM_DAMAGE_0_REQUIREMENTS_93) , } , ConditionalEnchantmentEffect { effect : EnchantmentValueEffect :: RemoveBinomial { chance : & UNBREAKING_ITEM_DAMAGE_1_LEVEL_VALUE_94 } , requirements : Some (& UNBREAKING_ITEM_DAMAGE_1_REQUIREMENTS_97) , }] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn vanishing_curse_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:prevent_equipment_drop" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound })) ; compound } } pub static VANISHING_CURSE : Enchantment = Enchantment { key : Identifier :: vanilla_static ("vanishing_curse") , max_level : 1 , min_cost : EnchantmentCost { base : 25 , per_level_above_first : 0 } , max_cost : EnchantmentCost { base : 50 , per_level_above_first : 0 } , anvil_cost : 8 , weight : 1 , slots : & [EquipmentSlotGroup :: Any] , supported_items : "#minecraft:enchantable/vanishing" , primary_items : None , exclusive_set : None , effects_nbt : vanishing_curse_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : true , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; fn wind_burst_effects_nbt () -> NbtCompound { { let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:post_attack" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("affected" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("effect" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("block_interaction" , NbtTag :: String ("trigger" . into ())) ; compound . insert ("immune_blocks" , NbtTag :: String ("#minecraft:blocks_wind_charge_explosions" . into ())) ; compound . insert ("knockback_multiplier" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("fallback" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("base" , NbtTag :: Float (1.5)) ; compound . insert ("per_level_above_first" , NbtTag :: Float (0.35)) ; compound . insert ("type" , NbtTag :: String ("minecraft:linear" . into ())) ; compound })) ; compound . insert ("type" , NbtTag :: String ("minecraft:lookup" . into ())) ; compound . insert ("values" , NbtTag :: List (NbtList :: from (vec ! [NbtTag :: Float (1.2) , NbtTag :: Float (1.75) , NbtTag :: Float (2.2)]))) ; compound })) ; compound . insert ("large_particle" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:gust_emitter_large" . into ())) ; compound })) ; compound . insert ("radius" , NbtTag :: Float (3.5)) ; compound . insert ("small_particle" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("type" , NbtTag :: String ("minecraft:gust_emitter_small" . into ())) ; compound })) ; compound . insert ("sound" , NbtTag :: String ("minecraft:entity.wind_charge.wind_burst" . into ())) ; compound . insert ("type" , NbtTag :: String ("minecraft:explode" . into ())) ; compound })) ; compound . insert ("enchanted" , NbtTag :: String ("attacker" . into ())) ; compound . insert ("requirements" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("condition" , NbtTag :: String ("minecraft:entity_properties" . into ())) ; compound . insert ("entity" , NbtTag :: String ("direct_attacker" . into ())) ; compound . insert ("predicate" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("minecraft:flags" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("is_flying" , NbtTag :: Byte (0i8)) ; compound })) ; compound . insert ("minecraft:movement" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("fall_distance" , NbtTag :: Compound ({ let mut compound = NbtCompound :: new () ; compound . insert ("min" , NbtTag :: Double (1.5)) ; compound })) ; compound })) ; compound })) ; compound })) ; compound })]))) ; compound } } pub static WIND_BURST : Enchantment = Enchantment { key : Identifier :: vanilla_static ("wind_burst") , max_level : 3 , min_cost : EnchantmentCost { base : 15 , per_level_above_first : 9 } , max_cost : EnchantmentCost { base : 65 , per_level_above_first : 9 } , anvil_cost : 4 , weight : 2 , slots : & [EquipmentSlotGroup :: MainHand] , supported_items : "#minecraft:enchantable/mace" , primary_items : None , exclusive_set : None , effects_nbt : wind_burst_effects_nbt , effects : EnchantmentEffects { damage_protection : & [] , damage_immunity : & [] , damage : & [] , smash_damage_per_fallen_block : & [] , knockback : & [] , armor_effectiveness : & [] , post_attack : & [TargetedConditionalEnchantmentEffect { effect : EnchantmentEntityEffect :: Unsupported { effect_type : Identifier :: new_static ("minecraft" , "explode") } , enchanted : EnchantmentTarget :: Attacker , affected : EnchantmentTarget :: Attacker , requirements : Some (& WIND_BURST_POST_ATTACK_0_REQUIREMENTS_99) , }] , post_piercing_attack : & [] , hit_block : false , item_damage : & [] , equipment_drops : & [] , location_changed : false , tick : false , ammo_use : & [] , projectile_piercing : & [] , projectile_spawned : & [] , projectile_spread : & [] , projectile_count : & [] , trident_return_acceleration : & [] , fishing_time_reduction : & [] , fishing_luck_bonus : & [] , block_experience : & [] , mob_experience : & [] , repair_with_xp : & [] , attributes : & [] , crossbow_charge_time : None , crossbow_charging_sounds : & [] , trident_sound : & [] , prevent_equipment_drop : false , prevent_armor_change : false , trident_spin_attack_strength : None , } , } ; static AQUA_AFFINITY_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_0 : LevelBasedValue = LevelBasedValue :: Linear { base : 4f32 , per_level_above_first : 4f32 } ; static BANE_OF_ARTHROPODS_DAMAGE_0_LEVEL_VALUE_1 : LevelBasedValue = LevelBasedValue :: Linear { base : 2.5f32 , per_level_above_first : 2.5f32 } ; static BANE_OF_ARTHROPODS_DAMAGE_0_REQUIREMENTS_2 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Tag (Identifier :: new_static ("minecraft" , "sensitive_to_bane_of_arthropods")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_3 : LevelBasedValue = LevelBasedValue :: Constant (1.5f32) ; static BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_4 : LevelBasedValue = LevelBasedValue :: Linear { base : 1.5f32 , per_level_above_first : 0.5f32 } ; static BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_5 : LevelBasedValue = LevelBasedValue :: Constant (3f32) ; static BANE_OF_ARTHROPODS_POST_ATTACK_0_LEVEL_VALUE_6 : LevelBasedValue = LevelBasedValue :: Constant (3f32) ; static BANE_OF_ARTHROPODS_POST_ATTACK_0_REQUIREMENTS_8 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Tag (Identifier :: new_static ("minecraft" , "sensitive_to_bane_of_arthropods")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static BANE_OF_ARTHROPODS_POST_ATTACK_0_REQUIREMENTS_9 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [] , is_direct : Some (true) }) ; static BANE_OF_ARTHROPODS_POST_ATTACK_0_REQUIREMENTS_7 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: AllOf (& [& BANE_OF_ARTHROPODS_POST_ATTACK_0_REQUIREMENTS_8 , & BANE_OF_ARTHROPODS_POST_ATTACK_0_REQUIREMENTS_9]) ; static BLAST_PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_10 : LevelBasedValue = LevelBasedValue :: Linear { base : 2f32 , per_level_above_first : 2f32 } ; static BLAST_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_11 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "is_explosion") , expected : true , } , DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "bypasses_invulnerability") , expected : false , }] , is_direct : None }) ; static BLAST_PROTECTION_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_12 : LevelBasedValue = LevelBasedValue :: Linear { base : 0.15f32 , per_level_above_first : 0.15f32 } ; static BREACH_ARMOR_EFFECTIVENESS_0_LEVEL_VALUE_13 : LevelBasedValue = LevelBasedValue :: Linear { base : - 0.15f32 , per_level_above_first : - 0.15f32 } ; static CHANNELING_POST_ATTACK_0_ENTITY_EFFECT_14 : EnchantmentEntityEffect = EnchantmentEntityEffect :: Unsupported { effect_type : Identifier :: new_static ("minecraft" , "summon_entity") } ; static CHANNELING_POST_ATTACK_0_ENTITY_EFFECT_15 : EnchantmentEntityEffect = EnchantmentEntityEffect :: PlaySound { sounds : & [& crate :: sound_events :: ITEM_TRIDENT_THUNDER] , volume : 5f32 , pitch : 1f32 , } ; static CHANNELING_POST_ATTACK_0_REQUIREMENTS_17 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: Unsupported { condition : Identifier :: new_static ("minecraft" , "weather_check") } ; static CHANNELING_POST_ATTACK_0_REQUIREMENTS_18 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : true , } , } ; static CHANNELING_POST_ATTACK_0_REQUIREMENTS_19 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: DirectAttacker , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Type (Identifier :: new_static ("minecraft" , "trident")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static CHANNELING_POST_ATTACK_0_REQUIREMENTS_16 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: AllOf (& [& CHANNELING_POST_ATTACK_0_REQUIREMENTS_17 , & CHANNELING_POST_ATTACK_0_REQUIREMENTS_18 , & CHANNELING_POST_ATTACK_0_REQUIREMENTS_19]) ; static DENSITY_SMASH_DAMAGE_PER_FALLEN_BLOCK_0_LEVEL_VALUE_20 : LevelBasedValue = LevelBasedValue :: Linear { base : 0.5f32 , per_level_above_first : 0.5f32 } ; static DEPTH_STRIDER_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_21 : LevelBasedValue = LevelBasedValue :: Linear { base : 0.33333334f32 , per_level_above_first : 0.33333334f32 } ; static EFFICIENCY_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_22 : LevelBasedValue = LevelBasedValue :: LevelsSquared { added : 1f32 } ; static FEATHER_FALLING_DAMAGE_PROTECTION_0_LEVEL_VALUE_23 : LevelBasedValue = LevelBasedValue :: Linear { base : 3f32 , per_level_above_first : 3f32 } ; static FEATHER_FALLING_DAMAGE_PROTECTION_0_REQUIREMENTS_24 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "is_fall") , expected : true , } , DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "bypasses_invulnerability") , expected : false , }] , is_direct : None }) ; static FIRE_ASPECT_POST_ATTACK_0_LEVEL_VALUE_25 : LevelBasedValue = LevelBasedValue :: Linear { base : 4f32 , per_level_above_first : 4f32 } ; static FIRE_ASPECT_POST_ATTACK_0_REQUIREMENTS_26 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [] , is_direct : Some (true) }) ; static FIRE_PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_27 : LevelBasedValue = LevelBasedValue :: Linear { base : 2f32 , per_level_above_first : 2f32 } ; static FIRE_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_29 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "is_fire") , expected : true , } , DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "bypasses_invulnerability") , expected : false , }] , is_direct : None }) ; static FIRE_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_28 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: AllOf (& [& FIRE_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_29]) ; static FIRE_PROTECTION_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_30 : LevelBasedValue = LevelBasedValue :: Linear { base : - 0.15f32 , per_level_above_first : - 0.15f32 } ; static FLAME_PROJECTILE_SPAWNED_0_LEVEL_VALUE_31 : LevelBasedValue = LevelBasedValue :: Constant (100f32) ; static FROST_WALKER_DAMAGE_IMMUNITY_0_REQUIREMENTS_32 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "burn_from_stepping") , expected : true , } , DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "bypasses_invulnerability") , expected : false , }] , is_direct : None }) ; static IMPALING_DAMAGE_0_LEVEL_VALUE_33 : LevelBasedValue = LevelBasedValue :: Linear { base : 2.5f32 , per_level_above_first : 2.5f32 } ; static IMPALING_DAMAGE_0_REQUIREMENTS_34 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Tag (Identifier :: new_static ("minecraft" , "sensitive_to_impaling")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static INFINITY_AMMO_USE_0_LEVEL_VALUE_35 : LevelBasedValue = LevelBasedValue :: Constant (0f32) ; static INFINITY_AMMO_USE_0_REQUIREMENTS_36 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: MatchTool { items : Some (EnchantmentItemSet :: Direct (& [Identifier :: new_static ("minecraft" , "arrow")])) } ; static KNOCKBACK_KNOCKBACK_0_LEVEL_VALUE_37 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static LOOTING_EQUIPMENT_DROPS_0_LEVEL_VALUE_38 : LevelBasedValue = LevelBasedValue :: Linear { base : 0.01f32 , per_level_above_first : 0.01f32 } ; static LOOTING_EQUIPMENT_DROPS_0_REQUIREMENTS_39 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: Attacker , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Type (Identifier :: new_static ("minecraft" , "player")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static LOYALTY_TRIDENT_RETURN_ACCELERATION_0_LEVEL_VALUE_40 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static LUCK_OF_THE_SEA_FISHING_LUCK_BONUS_0_LEVEL_VALUE_41 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static LUNGE_POST_PIERCING_ATTACK_0_LEVEL_VALUE_43 : LevelBasedValue = LevelBasedValue :: Constant (1f32) ; static LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_42 : EnchantmentEntityEffect = EnchantmentEntityEffect :: ChangeItemDamage { amount : & LUNGE_POST_PIERCING_ATTACK_0_LEVEL_VALUE_43 } ; static LUNGE_POST_PIERCING_ATTACK_0_LEVEL_VALUE_45 : LevelBasedValue = LevelBasedValue :: Linear { base : 4f32 , per_level_above_first : 4f32 } ; static LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_44 : EnchantmentEntityEffect = EnchantmentEntityEffect :: ApplyExhaustion { amount : & LUNGE_POST_PIERCING_ATTACK_0_LEVEL_VALUE_45 } ; static LUNGE_POST_PIERCING_ATTACK_0_LEVEL_VALUE_47 : LevelBasedValue = LevelBasedValue :: Linear { base : 0.458f32 , per_level_above_first : 0.458f32 } ; static LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_46 : EnchantmentEntityEffect = EnchantmentEntityEffect :: ApplyImpulse { direction : DVec3 :: new (0f64 , 0f64 , 1f64) , coordinate_scale : DVec3 :: new (1f64 , 0f64 , 1f64) , magnitude : & LUNGE_POST_PIERCING_ATTACK_0_LEVEL_VALUE_47 , } ; static LUNGE_POST_PIERCING_ATTACK_0_ENTITY_EFFECT_48 : EnchantmentEntityEffect = EnchantmentEntityEffect :: PlaySound { sounds : & [& crate :: sound_events :: ITEM_SPEAR_LUNGE_1 , & crate :: sound_events :: ITEM_SPEAR_LUNGE_2 , & crate :: sound_events :: ITEM_SPEAR_LUNGE_3] , volume : 1f32 , pitch : 1f32 , } ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_51 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Present , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_50 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: Inverted (& LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_51) ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_52 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : Some (false) , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_53 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : Some (false) , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_56 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Player (PlayerPredicate { game_modes : & [] , food_level_min : None , unsupported : false , }) , unsupported : false , } , } ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_55 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: Inverted (& LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_56) ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_57 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Player (PlayerPredicate { game_modes : & [GameType :: Creative] , food_level_min : None , unsupported : false , }) , unsupported : false , } , } ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_58 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Player (PlayerPredicate { game_modes : & [] , food_level_min : Some (7i32) , unsupported : false , }) , unsupported : false , } , } ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_54 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: AnyOf (& [& LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_55 , & LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_57 , & LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_58]) ; static LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_49 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: AllOf (& [& LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_50 , & LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_52 , & LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_53 , & LUNGE_POST_PIERCING_ATTACK_0_REQUIREMENTS_54]) ; static LURE_FISHING_TIME_REDUCTION_0_LEVEL_VALUE_59 : LevelBasedValue = LevelBasedValue :: Linear { base : 5f32 , per_level_above_first : 5f32 } ; static MENDING_REPAIR_WITH_XP_0_LEVEL_VALUE_60 : LevelBasedValue = LevelBasedValue :: Constant (2f32) ; static MULTISHOT_PROJECTILE_SPREAD_0_LEVEL_VALUE_61 : LevelBasedValue = LevelBasedValue :: Linear { base : 10f32 , per_level_above_first : 10f32 } ; static MULTISHOT_PROJECTILE_COUNT_0_LEVEL_VALUE_62 : LevelBasedValue = LevelBasedValue :: Linear { base : 2f32 , per_level_above_first : 2f32 } ; static PIERCING_PROJECTILE_PIERCING_0_LEVEL_VALUE_63 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static POWER_DAMAGE_0_LEVEL_VALUE_64 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 0.5f32 } ; static POWER_DAMAGE_0_REQUIREMENTS_65 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: DirectAttacker , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Tag (Identifier :: new_static ("minecraft" , "arrows")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static PROJECTILE_PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_66 : LevelBasedValue = LevelBasedValue :: Linear { base : 2f32 , per_level_above_first : 2f32 } ; static PROJECTILE_PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_67 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "is_projectile") , expected : true , } , DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "bypasses_invulnerability") , expected : false , }] , is_direct : None }) ; static PROTECTION_DAMAGE_PROTECTION_0_LEVEL_VALUE_68 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static PROTECTION_DAMAGE_PROTECTION_0_REQUIREMENTS_69 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: DamageSourceProperties (DamageSourcePredicate { tags : & [DamageSourceTagPredicate { tag : Identifier :: new_static ("minecraft" , "bypasses_invulnerability") , expected : false , }] , is_direct : None }) ; static PUNCH_KNOCKBACK_0_LEVEL_VALUE_70 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static PUNCH_KNOCKBACK_0_REQUIREMENTS_71 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: DirectAttacker , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Tag (Identifier :: new_static ("minecraft" , "arrows")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static QUICK_CHARGE_CROSSBOW_CHARGE_TIME_LEVEL_VALUE_72 : LevelBasedValue = LevelBasedValue :: Linear { base : - 0.25f32 , per_level_above_first : - 0.25f32 } ; static RESPIRATION_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_73 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static RIPTIDE_TRIDENT_SPIN_ATTACK_STRENGTH_LEVEL_VALUE_74 : LevelBasedValue = LevelBasedValue :: Linear { base : 1.5f32 , per_level_above_first : 0.75f32 } ; static SHARPNESS_DAMAGE_0_LEVEL_VALUE_75 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 0.5f32 } ; static SILK_TOUCH_BLOCK_EXPERIENCE_0_LEVEL_VALUE_76 : LevelBasedValue = LevelBasedValue :: Constant (0f32) ; static SMITE_DAMAGE_0_LEVEL_VALUE_77 : LevelBasedValue = LevelBasedValue :: Linear { base : 2.5f32 , per_level_above_first : 2.5f32 } ; static SMITE_DAMAGE_0_REQUIREMENTS_78 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: This , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Tag (Identifier :: new_static ("minecraft" , "sensitive_to_smite")) , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : false , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : false , } , } ; static SWEEPING_EDGE_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_80 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static SWEEPING_EDGE_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_81 : LevelBasedValue = LevelBasedValue :: Linear { base : 2f32 , per_level_above_first : 1f32 } ; static SWEEPING_EDGE_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_79 : LevelBasedValue = LevelBasedValue :: Fraction { numerator : & SWEEPING_EDGE_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_80 , denominator : & SWEEPING_EDGE_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_81 } ; static SWIFT_SNEAK_ATTRIBUTES_ATTRIBUTE_0_LEVEL_VALUE_82 : LevelBasedValue = LevelBasedValue :: Linear { base : 0.15f32 , per_level_above_first : 0.15f32 } ; static THORNS_POST_ATTACK_0_LEVEL_VALUE_84 : LevelBasedValue = LevelBasedValue :: Constant (1f32) ; static THORNS_POST_ATTACK_0_LEVEL_VALUE_85 : LevelBasedValue = LevelBasedValue :: Constant (5f32) ; static THORNS_POST_ATTACK_0_ENTITY_EFFECT_83 : EnchantmentEntityEffect = EnchantmentEntityEffect :: DamageEntity { min_damage : & THORNS_POST_ATTACK_0_LEVEL_VALUE_84 , max_damage : & THORNS_POST_ATTACK_0_LEVEL_VALUE_85 , damage_type : & crate :: vanilla_damage_types :: THORNS , } ; static THORNS_POST_ATTACK_0_LEVEL_VALUE_87 : LevelBasedValue = LevelBasedValue :: Constant (2f32) ; static THORNS_POST_ATTACK_0_ENTITY_EFFECT_86 : EnchantmentEntityEffect = EnchantmentEntityEffect :: ChangeItemDamage { amount : & THORNS_POST_ATTACK_0_LEVEL_VALUE_87 } ; static THORNS_POST_ATTACK_0_LEVEL_VALUE_89 : LevelBasedValue = LevelBasedValue :: Linear { base : 0.15f32 , per_level_above_first : 0.15f32 } ; static THORNS_POST_ATTACK_0_REQUIREMENTS_88 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: RandomChance { chance : & THORNS_POST_ATTACK_0_LEVEL_VALUE_89 } ; static UNBREAKING_ITEM_DAMAGE_0_LEVEL_VALUE_91 : LevelBasedValue = LevelBasedValue :: Linear { base : 2f32 , per_level_above_first : 2f32 } ; static UNBREAKING_ITEM_DAMAGE_0_LEVEL_VALUE_92 : LevelBasedValue = LevelBasedValue :: Linear { base : 10f32 , per_level_above_first : 5f32 } ; static UNBREAKING_ITEM_DAMAGE_0_LEVEL_VALUE_90 : LevelBasedValue = LevelBasedValue :: Fraction { numerator : & UNBREAKING_ITEM_DAMAGE_0_LEVEL_VALUE_91 , denominator : & UNBREAKING_ITEM_DAMAGE_0_LEVEL_VALUE_92 } ; static UNBREAKING_ITEM_DAMAGE_0_REQUIREMENTS_93 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: MatchTool { items : Some (EnchantmentItemSet :: Tag (Identifier :: new_static ("minecraft" , "enchantable/armor"))) } ; static UNBREAKING_ITEM_DAMAGE_1_LEVEL_VALUE_95 : LevelBasedValue = LevelBasedValue :: Linear { base : 1f32 , per_level_above_first : 1f32 } ; static UNBREAKING_ITEM_DAMAGE_1_LEVEL_VALUE_96 : LevelBasedValue = LevelBasedValue :: Linear { base : 2f32 , per_level_above_first : 1f32 } ; static UNBREAKING_ITEM_DAMAGE_1_LEVEL_VALUE_94 : LevelBasedValue = LevelBasedValue :: Fraction { numerator : & UNBREAKING_ITEM_DAMAGE_1_LEVEL_VALUE_95 , denominator : & UNBREAKING_ITEM_DAMAGE_1_LEVEL_VALUE_96 } ; static UNBREAKING_ITEM_DAMAGE_1_REQUIREMENTS_98 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: MatchTool { items : Some (EnchantmentItemSet :: Tag (Identifier :: new_static ("minecraft" , "enchantable/armor"))) } ; static UNBREAKING_ITEM_DAMAGE_1_REQUIREMENTS_97 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: Inverted (& UNBREAKING_ITEM_DAMAGE_1_REQUIREMENTS_98) ; static WIND_BURST_POST_ATTACK_0_REQUIREMENTS_99 : EnchantmentEffectRequirements = EnchantmentEffectRequirements :: EntityProperties { entity : EnchantmentEntityTarget :: DirectAttacker , predicate : EntityPredicate { entity_type : EntityTypePredicate :: Any , vehicle : EntityVehiclePredicate :: Any , flags : EntityFlagsPredicate { is_fall_flying : None , is_in_water : None , unsupported : true , } , type_specific : EntityTypeSpecificPredicate :: Any , unsupported : true , } , } ; pub fn register_enchantments (registry : & mut EnchantmentRegistry) { registry . register (& AQUA_AFFINITY) ; registry . register (& BANE_OF_ARTHROPODS) ; registry . register (& BINDING_CURSE) ; registry . register (& BLAST_PROTECTION) ; registry . register (& BREACH) ; registry . register (& CHANNELING) ; registry . register (& DENSITY) ; registry . register (& DEPTH_STRIDER) ; registry . register (& EFFICIENCY) ; registry . register (& FEATHER_FALLING) ; registry . register (& FIRE_ASPECT) ; registry . register (& FIRE_PROTECTION) ; registry . register (& FLAME) ; registry . register (& FORTUNE) ; registry . register (& FROST_WALKER) ; registry . register (& IMPALING) ; registry . register (& INFINITY) ; registry . register (& KNOCKBACK) ; registry . register (& LOOTING) ; registry . register (& LOYALTY) ; registry . register (& LUCK_OF_THE_SEA) ; registry . register (& LUNGE) ; registry . register (& LURE) ; registry . register (& MENDING) ; registry . register (& MULTISHOT) ; registry . register (& PIERCING) ; registry . register (& POWER) ; registry . register (& PROJECTILE_PROTECTION) ; registry . register (& PROTECTION) ; registry . register (& PUNCH) ; registry . register (& QUICK_CHARGE) ; registry . register (& RESPIRATION) ; registry . register (& RIPTIDE) ; registry . register (& SHARPNESS) ; registry . register (& SILK_TOUCH) ; registry . register (& SMITE) ; registry . register (& SOUL_SPEED) ; registry . register (& SWEEPING_EDGE) ; registry . register (& SWIFT_SNEAK) ; registry . register (& THORNS) ; registry . register (& UNBREAKING) ; registry . register (& VANISHING_CURSE) ; registry . register (& WIND_BURST) ; }