#[non_exhaustive]pub struct EnchantmentInfo {
pub id: u16,
pub name: &'static str,
pub display_name: &'static str,
pub max_level: u8,
pub min_cost: EnchantCost,
pub max_cost: EnchantCost,
pub exclude: &'static [&'static str],
pub category: &'static str,
pub weight: u8,
pub treasure_only: bool,
pub curse: bool,
}Expand description
An enchantment.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u16Enchantment id (1.8: the NBT id short; 1.16: registry id).
name: &'static strRegistry name.
display_name: &'static strEnglish display name.
max_level: u8Highest level.
min_cost: EnchantCostMinimum enchanting cost.
max_cost: EnchantCostMaximum enchanting cost.
exclude: &'static [&'static str]Names of incompatible enchantments.
category: &'static strApplicable item category ("armor", "digger", …).
weight: u8Random-selection weight.
treasure_only: boolOnly from loot / trades.
curse: boolCurse.
Trait Implementations§
Source§impl Clone for EnchantmentInfo
impl Clone for EnchantmentInfo
impl Copy for EnchantmentInfo
Source§impl Debug for EnchantmentInfo
impl Debug for EnchantmentInfo
impl Eq for EnchantmentInfo
Source§impl PartialEq for EnchantmentInfo
impl PartialEq for EnchantmentInfo
impl StructuralPartialEq for EnchantmentInfo
Auto Trait Implementations§
impl Forget for EnchantmentInfo
impl Freeze for EnchantmentInfo
impl RefUnwindSafe for EnchantmentInfo
impl Send for EnchantmentInfo
impl Sync for EnchantmentInfo
impl Unpin for EnchantmentInfo
impl UnsafeUnpin for EnchantmentInfo
impl UnwindSafe for EnchantmentInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more