ghast-data 0.4.7

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.8/enchantments.json.

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

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

pub(crate) static ENCHANTMENTS: [EnchantmentInfo; 25] = [
    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_chest", 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: 16, 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: 17, 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: 18, 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: 19, 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: 20, 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: 21, 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: 32, 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: 33, 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: 34, 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: 35, 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: 48, 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: 49, 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: 50, 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: 51, 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: 61, 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: 62, 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 },
];

pub(crate) static ENCHANTMENT_NAMES: [(u32, u16); 25] = [
    (13, 6),
    (31, 18),
    (47, 3),
    (60, 8),
    (70, 32),
    (85, 2),
    (96, 20),
    (111, 1),
    (116, 50),
    (123, 35),
    (131, 51),
    (140, 19),
    (147, 21),
    (162, 61),
    (166, 62),
    (171, 48),
    (192, 4),
    (202, 0),
    (207, 49),
    (218, 5),
    (227, 16),
    (237, 33),
    (242, 17),
    (248, 7),
    (258, 34),
];
pub(crate) const ENCHANTMENT_NAMES_TEXT: &str = "aqua_affinitybane_of_arthropodsblast_protectiondepth_striderefficiencyfeather_fallingfire_aspectfire_protectionflamefortuneinfinityknockbacklootingluck_of_the_sealurepowerprojectile_protectionprotectionpunchrespirationsharpnesssilk_touchsmitethornsunbreaking";