#[non_exhaustive]pub struct MountRules {
pub saddle: bool,
pub armor: MountArmor,
}Expand description
What a mount’s saddle and armor slots accept, read off the entity the screen belongs to
(vanilla’s HorseScreenHandler asks the entity). Give it with
Inventory::set_mount_rules; without it only stacks the
rules cannot concern (no saddle, horse armor or carpet) are predicted in those slots.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.saddle: boolThe saddle slot takes a saddle: 1.8 always; 1.12 every mount but llamas
(canBeSaddled); 1.16.5 a tame adult horse, donkey, mule, zombie or skeleton horse.
armor: MountArmorWhat the armor slot takes.
Implementations§
Source§impl MountRules
impl MountRules
Sourcepub fn new(saddle: bool, armor: MountArmor) -> MountRules
pub fn new(saddle: bool, armor: MountArmor) -> MountRules
Rules from their parts.
Trait Implementations§
Source§impl Clone for MountRules
impl Clone for MountRules
impl Copy for MountRules
Source§impl Debug for MountRules
impl Debug for MountRules
Source§impl Default for MountRules
impl Default for MountRules
impl Eq for MountRules
Source§impl Hash for MountRules
impl Hash for MountRules
Source§impl PartialEq for MountRules
impl PartialEq for MountRules
impl StructuralPartialEq for MountRules
Auto Trait Implementations§
impl Forget for MountRules
impl Freeze for MountRules
impl Move for MountRules
impl RefUnwindSafe for MountRules
impl Send for MountRules
impl Sync for MountRules
impl Unpin for MountRules
impl UnsafeUnpin for MountRules
impl UnwindSafe for MountRules
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