pub struct EquipmentTable {
pub loot_table: Identifier,
pub slot_drop_chances: Vec<(EquipmentSlot, f32)>,
}Expand description
Equipment loot-table configuration attached to spawner data.
Fields§
§loot_table: IdentifierLoot table used to roll the spawned mob’s equipment.
slot_drop_chances: Vec<(EquipmentSlot, f32)>Per-slot drop chances for the rolled equipment.
Implementations§
Source§impl EquipmentTable
impl EquipmentTable
fn from_nbt(nbt: &NbtCompoundView<'_, '_>) -> Option<Self>
fn to_nbt(&self) -> NbtCompound
Sourcepub fn drop_chance(&self, slot: EquipmentSlot) -> Option<f32>
pub fn drop_chance(&self, slot: EquipmentSlot) -> Option<f32>
Returns the configured drop chance for a slot, if one was supplied.
Trait Implementations§
Source§impl Clone for EquipmentTable
impl Clone for EquipmentTable
Source§impl Debug for EquipmentTable
impl Debug for EquipmentTable
Source§impl PartialEq for EquipmentTable
impl PartialEq for EquipmentTable
impl StructuralPartialEq for EquipmentTable
Auto Trait Implementations§
impl Freeze for EquipmentTable
impl RefUnwindSafe for EquipmentTable
impl Send for EquipmentTable
impl Sync for EquipmentTable
impl Unpin for EquipmentTable
impl UnsafeUnpin for EquipmentTable
impl UnwindSafe for EquipmentTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>