pub struct CraftingShiftClickBatchEvent {
pub result: Slot,
pub max_count: u32,
pub cancelled: bool,
}Expand description
A shift-click batch craft is about to begin (cancellable).
Fired at the Validate stage on the game bus immediately
after CraftingPreCraftEvent when the player shift-clicks the
crafting output. Plugins can cancel the entire batch, or lower
max_count to cap the number of iterations (e.g. anti-grief
limit “max 16 crafted per shift-click”). Increasing max_count
has no effect — the natural inventory-space cap still applies.
Fields§
§result: SlotThe result the player will receive on each iteration.
max_count: u32Maximum number of crafts to perform. Mutable at Validate
— plugins lower this to cap the batch. Initial value is
u32::MAX (the loop is naturally capped by available
inventory space).
cancelled: boolWhether this event has been cancelled by a Validate handler.
Trait Implementations§
Source§impl Clone for CraftingShiftClickBatchEvent
impl Clone for CraftingShiftClickBatchEvent
Source§fn clone(&self) -> CraftingShiftClickBatchEvent
fn clone(&self) -> CraftingShiftClickBatchEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CraftingShiftClickBatchEvent
impl Debug for CraftingShiftClickBatchEvent
Source§impl Event for CraftingShiftClickBatchEvent
impl Event for CraftingShiftClickBatchEvent
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether this event has been cancelled by a Validate handler.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Upcasts to
&mut dyn Any for mutable type-erased dispatch.Auto Trait Implementations§
impl Freeze for CraftingShiftClickBatchEvent
impl RefUnwindSafe for CraftingShiftClickBatchEvent
impl Send for CraftingShiftClickBatchEvent
impl Sync for CraftingShiftClickBatchEvent
impl Unpin for CraftingShiftClickBatchEvent
impl UnsafeUnpin for CraftingShiftClickBatchEvent
impl UnwindSafe for CraftingShiftClickBatchEvent
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