#[non_exhaustive]pub enum UseStop {
AtSelect,
HeldReplaced,
HeldItemChanged,
}Expand description
When a change of the stack in the used hand ends an item use.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AtSelect
At once when the bot selects another slot (or the server does).
HeldReplaced
In the player tick after the key handling, when the hand’s stack object was replaced:
another hotbar slot, or any server write of that slot (set_slot, window_items), even
of an equal stack (1.8 PlayerEntity.tick, 1.12 updateActiveHand: identity).
HeldItemChanged
In the player tick after the key handling, when the hand holds another item (1.16.5
tickActiveItemStack: ItemStack.areItemsEqual); a slot change to the same item or a
resync keeps the use.
Trait Implementations§
impl Copy for UseStop
impl Eq for UseStop
impl StructuralPartialEq for UseStop
Auto Trait Implementations§
impl Forget for UseStop
impl Freeze for UseStop
impl Move for UseStop
impl RefUnwindSafe for UseStop
impl Send for UseStop
impl Sync for UseStop
impl Unpin for UseStop
impl UnsafeUnpin for UseStop
impl UnwindSafe for UseStop
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