#[non_exhaustive]pub enum InvulnerableEating {
Never,
Always,
Hunger,
}Expand description
What an invulnerable player (creative, spectator) may eat: PlayerEntity.canConsume.
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.
Never
Nothing (1.8, 1.12: !abilities.invulnerable is part of the test).
Always
Anything, full or not (1.14+ and 26.x: abilities.invulnerable || …).
Hunger
As any player (the hunger rule only; no version uses it any more).
Trait Implementations§
Source§impl Clone for InvulnerableEating
impl Clone for InvulnerableEating
impl Copy for InvulnerableEating
Source§impl Debug for InvulnerableEating
impl Debug for InvulnerableEating
impl Eq for InvulnerableEating
Source§impl Hash for InvulnerableEating
impl Hash for InvulnerableEating
Source§impl PartialEq for InvulnerableEating
impl PartialEq for InvulnerableEating
impl StructuralPartialEq for InvulnerableEating
Auto Trait Implementations§
impl Forget for InvulnerableEating
impl Freeze for InvulnerableEating
impl Move for InvulnerableEating
impl RefUnwindSafe for InvulnerableEating
impl Send for InvulnerableEating
impl Sync for InvulnerableEating
impl Unpin for InvulnerableEating
impl UnsafeUnpin for InvulnerableEating
impl UnwindSafe for InvulnerableEating
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