ghast-data 0.4.2

Static Minecraft Java Edition game data for the ghast client library: blocks, block states, collision shapes, items, entities, biomes, enchantments, foods (generated from PrismarineJS minecraft-data)
Documentation
//! Enchantments.
//!
//! @generated by `cargo run -p ghast-codegen-data` from PrismarineJS minecraft-data 3.119.0 — do not edit.
//! Sources: pc/1.16.4/enchantments.json.

#![allow(clippy::all, clippy::pedantic, clippy::nursery, missing_docs)]

use crate::common::{EnchantCost, EnchantmentInfo};

pub(crate) static ENCHANTMENTS: [EnchantmentInfo; 38] = [
    EnchantmentInfo { id: 0, name: "protection", #[cfg(feature = "display-names")] display_name: "Protection", max_level: 4, min_cost: EnchantCost { a: 11, b: -10 }, max_cost: EnchantCost { a: 11, b: 1 }, exclude: &["blast_protection", "fire_protection", "projectile_protection"], category: "armor", weight: 10, treasure_only: false, curse: false },
    EnchantmentInfo { id: 1, name: "fire_protection", #[cfg(feature = "display-names")] display_name: "Fire Protection", max_level: 4, min_cost: EnchantCost { a: 8, b: 2 }, max_cost: EnchantCost { a: 8, b: 10 }, exclude: &["blast_protection", "protection", "projectile_protection"], category: "armor", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 2, name: "feather_falling", #[cfg(feature = "display-names")] display_name: "Feather Falling", max_level: 4, min_cost: EnchantCost { a: 6, b: -1 }, max_cost: EnchantCost { a: 6, b: 5 }, exclude: &[], category: "armor_feet", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 3, name: "blast_protection", #[cfg(feature = "display-names")] display_name: "Blast Protection", max_level: 4, min_cost: EnchantCost { a: 8, b: -3 }, max_cost: EnchantCost { a: 8, b: 5 }, exclude: &["fire_protection", "protection", "projectile_protection"], category: "armor", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 4, name: "projectile_protection", #[cfg(feature = "display-names")] display_name: "Projectile Protection", max_level: 4, min_cost: EnchantCost { a: 6, b: -3 }, max_cost: EnchantCost { a: 6, b: 3 }, exclude: &["protection", "blast_protection", "fire_protection"], category: "armor", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 5, name: "respiration", #[cfg(feature = "display-names")] display_name: "Respiration", max_level: 3, min_cost: EnchantCost { a: 10, b: 0 }, max_cost: EnchantCost { a: 10, b: 30 }, exclude: &[], category: "armor_head", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 6, name: "aqua_affinity", #[cfg(feature = "display-names")] display_name: "Aqua Affinity", max_level: 1, min_cost: EnchantCost { a: 0, b: 1 }, max_cost: EnchantCost { a: 0, b: 41 }, exclude: &[], category: "armor_head", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 7, name: "thorns", #[cfg(feature = "display-names")] display_name: "Thorns", max_level: 3, min_cost: EnchantCost { a: 20, b: -10 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "armor_feet", weight: 1, treasure_only: false, curse: false },
    EnchantmentInfo { id: 8, name: "depth_strider", #[cfg(feature = "display-names")] display_name: "Depth Strider", max_level: 3, min_cost: EnchantCost { a: 10, b: 0 }, max_cost: EnchantCost { a: 10, b: 15 }, exclude: &["frost_walker"], category: "armor_feet", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 9, name: "frost_walker", #[cfg(feature = "display-names")] display_name: "Frost Walker", max_level: 2, min_cost: EnchantCost { a: 10, b: 0 }, max_cost: EnchantCost { a: 10, b: 15 }, exclude: &["depth_strider"], category: "armor_feet", weight: 2, treasure_only: true, curse: false },
    EnchantmentInfo { id: 10, name: "binding_curse", #[cfg(feature = "display-names")] display_name: "Curse of Binding", max_level: 1, min_cost: EnchantCost { a: 0, b: 25 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &[], category: "wearable", weight: 1, treasure_only: true, curse: true },
    EnchantmentInfo { id: 11, name: "soul_speed", #[cfg(feature = "display-names")] display_name: "Soul Speed", max_level: 3, min_cost: EnchantCost { a: 10, b: 0 }, max_cost: EnchantCost { a: 10, b: 15 }, exclude: &[], category: "armor_feet", weight: 1, treasure_only: true, curse: false },
    EnchantmentInfo { id: 12, name: "sharpness", #[cfg(feature = "display-names")] display_name: "Sharpness", max_level: 5, min_cost: EnchantCost { a: 11, b: -10 }, max_cost: EnchantCost { a: 11, b: 10 }, exclude: &["smite", "bane_of_arthropods"], category: "weapon", weight: 10, treasure_only: false, curse: false },
    EnchantmentInfo { id: 13, name: "smite", #[cfg(feature = "display-names")] display_name: "Smite", max_level: 5, min_cost: EnchantCost { a: 8, b: -3 }, max_cost: EnchantCost { a: 8, b: 17 }, exclude: &["sharpness", "bane_of_arthropods"], category: "weapon", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 14, name: "bane_of_arthropods", #[cfg(feature = "display-names")] display_name: "Bane of Arthropods", max_level: 5, min_cost: EnchantCost { a: 8, b: -3 }, max_cost: EnchantCost { a: 8, b: 17 }, exclude: &["smite", "sharpness"], category: "weapon", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 15, name: "knockback", #[cfg(feature = "display-names")] display_name: "Knockback", max_level: 2, min_cost: EnchantCost { a: 20, b: -15 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "weapon", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 16, name: "fire_aspect", #[cfg(feature = "display-names")] display_name: "Fire Aspect", max_level: 2, min_cost: EnchantCost { a: 20, b: -10 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "weapon", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 17, name: "looting", #[cfg(feature = "display-names")] display_name: "Looting", max_level: 3, min_cost: EnchantCost { a: 9, b: 6 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "weapon", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 18, name: "sweeping", #[cfg(feature = "display-names")] display_name: "Sweeping Edge", max_level: 3, min_cost: EnchantCost { a: 9, b: -4 }, max_cost: EnchantCost { a: 9, b: 11 }, exclude: &[], category: "weapon", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 19, name: "efficiency", #[cfg(feature = "display-names")] display_name: "Efficiency", max_level: 5, min_cost: EnchantCost { a: 10, b: -9 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "digger", weight: 10, treasure_only: false, curse: false },
    EnchantmentInfo { id: 20, name: "silk_touch", #[cfg(feature = "display-names")] display_name: "Silk Touch", max_level: 1, min_cost: EnchantCost { a: 0, b: 15 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &["fortune"], category: "digger", weight: 1, treasure_only: false, curse: false },
    EnchantmentInfo { id: 21, name: "unbreaking", #[cfg(feature = "display-names")] display_name: "Unbreaking", max_level: 3, min_cost: EnchantCost { a: 8, b: -3 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "breakable", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 22, name: "fortune", #[cfg(feature = "display-names")] display_name: "Fortune", max_level: 3, min_cost: EnchantCost { a: 9, b: 6 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &["silk_touch"], category: "digger", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 23, name: "power", #[cfg(feature = "display-names")] display_name: "Power", max_level: 5, min_cost: EnchantCost { a: 10, b: -9 }, max_cost: EnchantCost { a: 10, b: 6 }, exclude: &[], category: "bow", weight: 10, treasure_only: false, curse: false },
    EnchantmentInfo { id: 24, name: "punch", #[cfg(feature = "display-names")] display_name: "Punch", max_level: 2, min_cost: EnchantCost { a: 20, b: -8 }, max_cost: EnchantCost { a: 20, b: 17 }, exclude: &[], category: "bow", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 25, name: "flame", #[cfg(feature = "display-names")] display_name: "Flame", max_level: 1, min_cost: EnchantCost { a: 0, b: 20 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &[], category: "bow", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 26, name: "infinity", #[cfg(feature = "display-names")] display_name: "Infinity", max_level: 1, min_cost: EnchantCost { a: 0, b: 20 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &["mending"], category: "bow", weight: 1, treasure_only: false, curse: false },
    EnchantmentInfo { id: 27, name: "luck_of_the_sea", #[cfg(feature = "display-names")] display_name: "Luck of the Sea", max_level: 3, min_cost: EnchantCost { a: 9, b: 6 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "fishing_rod", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 28, name: "lure", #[cfg(feature = "display-names")] display_name: "Lure", max_level: 3, min_cost: EnchantCost { a: 9, b: 6 }, max_cost: EnchantCost { a: 10, b: 51 }, exclude: &[], category: "fishing_rod", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 29, name: "loyalty", #[cfg(feature = "display-names")] display_name: "Loyalty", max_level: 3, min_cost: EnchantCost { a: 7, b: 5 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &["riptide"], category: "trident", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 30, name: "impaling", #[cfg(feature = "display-names")] display_name: "Impaling", max_level: 5, min_cost: EnchantCost { a: 8, b: -7 }, max_cost: EnchantCost { a: 8, b: 13 }, exclude: &[], category: "trident", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 31, name: "riptide", #[cfg(feature = "display-names")] display_name: "Riptide", max_level: 3, min_cost: EnchantCost { a: 7, b: 10 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &["loyalty", "channeling"], category: "trident", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 32, name: "channeling", #[cfg(feature = "display-names")] display_name: "Channeling", max_level: 1, min_cost: EnchantCost { a: 0, b: 25 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &["riptide"], category: "trident", weight: 1, treasure_only: false, curse: false },
    EnchantmentInfo { id: 33, name: "multishot", #[cfg(feature = "display-names")] display_name: "Multishot", max_level: 1, min_cost: EnchantCost { a: 0, b: 20 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &["piercing"], category: "crossbow", weight: 2, treasure_only: false, curse: false },
    EnchantmentInfo { id: 34, name: "quick_charge", #[cfg(feature = "display-names")] display_name: "Quick Charge", max_level: 3, min_cost: EnchantCost { a: 20, b: -8 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &[], category: "crossbow", weight: 5, treasure_only: false, curse: false },
    EnchantmentInfo { id: 35, name: "piercing", #[cfg(feature = "display-names")] display_name: "Piercing", max_level: 4, min_cost: EnchantCost { a: 10, b: -9 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &["multishot"], category: "crossbow", weight: 10, treasure_only: false, curse: false },
    EnchantmentInfo { id: 36, name: "mending", #[cfg(feature = "display-names")] display_name: "Mending", max_level: 1, min_cost: EnchantCost { a: 25, b: 0 }, max_cost: EnchantCost { a: 25, b: 50 }, exclude: &["infinity"], category: "breakable", weight: 2, treasure_only: true, curse: false },
    EnchantmentInfo { id: 37, name: "vanishing_curse", #[cfg(feature = "display-names")] display_name: "Curse of Vanishing", max_level: 1, min_cost: EnchantCost { a: 0, b: 25 }, max_cost: EnchantCost { a: 0, b: 50 }, exclude: &[], category: "vanishable", weight: 1, treasure_only: true, curse: true },
];

pub(crate) static ENCHANTMENT_NAMES: [(u32, u16); 38] = [
    (13, 6),
    (31, 14),
    (44, 10),
    (60, 3),
    (70, 32),
    (83, 8),
    (93, 19),
    (108, 2),
    (119, 16),
    (134, 1),
    (139, 25),
    (146, 22),
    (158, 9),
    (166, 30),
    (174, 26),
    (183, 15),
    (190, 17),
    (197, 29),
    (212, 27),
    (216, 28),
    (223, 36),
    (232, 33),
    (240, 35),
    (245, 23),
    (266, 4),
    (276, 0),
    (281, 24),
    (293, 34),
    (304, 5),
    (311, 31),
    (320, 12),
    (330, 20),
    (335, 13),
    (345, 11),
    (353, 18),
    (359, 7),
    (369, 21),
    (384, 37),
];
pub(crate) const ENCHANTMENT_NAMES_TEXT: &str = "aqua_affinitybane_of_arthropodsbinding_curseblast_protectionchannelingdepth_striderefficiencyfeather_fallingfire_aspectfire_protectionflamefortunefrost_walkerimpalinginfinityknockbacklootingloyaltyluck_of_the_sealuremendingmultishotpiercingpowerprojectile_protectionprotectionpunchquick_chargerespirationriptidesharpnesssilk_touchsmitesoul_speedsweepingthornsunbreakingvanishing_curse";