Struct MapDecoration
pub struct MapDecoration {
pub sprite: String,
pub x: i8,
pub y: i8,
pub rot: u8,
pub shown_on_frame: bool,
}Expand description
An icon a native mod puts on a map: the same place and pose as vanilla’s
decorations (MapDecoration).
Fields§
§sprite: StringAn atlas sprite: vanilla’s map/decorations/<name>, or a content
mod’s texture. An unknown sprite is left out.
x: i8The position on the map in half map pixels, -128 (left, top) to 127.
For the world position (wx, wz): (wx - center_x) / (1 << scale) * 2,
and the same for z, floored and clamped.
y: i8§rot: u80 to 15, in 22.5 degree steps clockwise (only the low four bits count).
shown_on_frame: boolWhether it shows in an item frame and on the cartography screen
(MapDecorationType.showOnItemFrame); a held map shows all.
Trait Implementations§
§impl Clone for MapDecoration
impl Clone for MapDecoration
§fn clone(&self) -> MapDecoration
fn clone(&self) -> MapDecoration
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 more§impl Debug for MapDecoration
impl Debug for MapDecoration
§impl PartialEq for MapDecoration
impl PartialEq for MapDecoration
impl StructuralPartialEq for MapDecoration
Auto Trait Implementations§
impl Freeze for MapDecoration
impl RefUnwindSafe for MapDecoration
impl Send for MapDecoration
impl Sync for MapDecoration
impl Unpin for MapDecoration
impl UnsafeUnpin for MapDecoration
impl UnwindSafe for MapDecoration
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