Struct EnchantmentDamageContext
pub struct EnchantmentDamageContext<'a> {
pub attacker: LivingRef,
pub victim: EntityRef,
pub weapon: &'a ItemStack,
pub level: u32,
pub config: &'a Tag,
}Expand description
Context of one value node in ordinary enchantment damage computation.
Fields§
§attacker: LivingRefThe actual attacker of this hit.
victim: EntityRefThe actual victim of this hit.
weapon: &'a ItemStackWeapon snapshot taken before the hit.
level: u32Enchantment level on the weapon.
config: &'a TagThis effect node’s content, converted once to NBT at load, including its type and custom fields.
Auto Trait Implementations§
impl<'a> Freeze for EnchantmentDamageContext<'a>
impl<'a> RefUnwindSafe for EnchantmentDamageContext<'a>
impl<'a> Send for EnchantmentDamageContext<'a>
impl<'a> Sync for EnchantmentDamageContext<'a>
impl<'a> Unpin for EnchantmentDamageContext<'a>
impl<'a> UnsafeUnpin for EnchantmentDamageContext<'a>
impl<'a> UnwindSafe for EnchantmentDamageContext<'a>
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