pub struct LootPool {
pub rolls: NumberProvider,
pub bonus_rolls: f32,
pub entries: &'static [LootEntry],
pub conditions: &'static [LootCondition],
pub functions: &'static [ConditionalLootFunction],
}Expand description
A pool of loot entries with roll counts.
Fields§
§rolls: NumberProvider§bonus_rolls: f32§entries: &'static [LootEntry]§conditions: &'static [LootCondition]§functions: &'static [ConditionalLootFunction]Implementations§
Source§impl LootPool
impl LootPool
Sourcefn add_random_items<R: Rng>(
&self,
ctx: &mut LootContext<'_, R>,
result: &mut Vec<ItemStack>,
)
fn add_random_items<R: Rng>( &self, ctx: &mut LootContext<'_, R>, result: &mut Vec<ItemStack>, )
Add random items from this pool to the result.
Sourcefn add_random_item<R: Rng>(
&self,
ctx: &mut LootContext<'_, R>,
result: &mut Vec<ItemStack>,
)
fn add_random_item<R: Rng>( &self, ctx: &mut LootContext<'_, R>, result: &mut Vec<ItemStack>, )
Select and add a single random item from this pool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LootPool
impl RefUnwindSafe for LootPool
impl Send for LootPool
impl Sync for LootPool
impl Unpin for LootPool
impl UnsafeUnpin for LootPool
impl UnwindSafe for LootPool
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