Enum InteractionResult
#[non_exhaustive]pub enum InteractionResult {
Success,
SuccessServer,
Consume,
Fail,
Pass,
TryWithEmptyHand,
}Expand description
Vanilla’s InteractionResult, as a hook answers it.
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.
Success
SUCCESS: the action is used and the hand swings on the clicking
client (SwingSource.PREDICTED).
SuccessServer
SUCCESS_SERVER: the action is used and the server swings the hand.
Consume
CONSUME: the action is used, with no swing.
Fail
FAIL: nothing happens and the click ends.
Pass
PASS: nothing happens and the click goes on.
TryWithEmptyHand
TRY_WITH_EMPTY_HAND: for a block’s use_item_on, try its
use_without_item next, on the main hand only.
Implementations§
§impl InteractionResult
impl InteractionResult
pub fn consumes_action(self) -> bool
pub fn consumes_action(self) -> bool
consumesAction: the click is used up.
Trait Implementations§
§impl Clone for InteractionResult
impl Clone for InteractionResult
§fn clone(&self) -> InteractionResult
fn clone(&self) -> InteractionResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InteractionResult
§impl Debug for InteractionResult
impl Debug for InteractionResult
§impl Default for InteractionResult
impl Default for InteractionResult
§fn default() -> InteractionResult
fn default() -> InteractionResult
Returns the “default value” for a type. Read more
impl Eq for InteractionResult
§impl PartialEq for InteractionResult
impl PartialEq for InteractionResult
impl StructuralPartialEq for InteractionResult
Auto Trait Implementations§
impl Freeze for InteractionResult
impl RefUnwindSafe for InteractionResult
impl Send for InteractionResult
impl Sync for InteractionResult
impl Unpin for InteractionResult
impl UnsafeUnpin for InteractionResult
impl UnwindSafe for InteractionResult
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