pub struct AssemblyHitbox {
pub width: f64,
pub height: f64,
pub offset: [i32; 3],
}Expand description
An assembly’s hitbox (spec-0082 §3.2): a minecraft:interaction of
width × height whose bottom centre is the mark’s cell centre plus
offset. Melee only: an arrow passes through an interaction.
Fields§
§width: f64Width in blocks (0 < width <= 6, DW0936).
height: f64Height in blocks (0 < height <= 22, DW0936).
offset: [i32; 3]Integer [x, y, z] block offset of the box’s bottom centre from the
mark (default [0, 0, 0]).
Trait Implementations§
Source§impl Clone for AssemblyHitbox
impl Clone for AssemblyHitbox
Source§impl Debug for AssemblyHitbox
impl Debug for AssemblyHitbox
Source§impl<'de> Deserialize<'de> for AssemblyHitbox
impl<'de> Deserialize<'de> for AssemblyHitbox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for AssemblyHitbox
impl JsonSchema for AssemblyHitbox
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AssemblyHitbox
impl PartialEq for AssemblyHitbox
Source§impl Serialize for AssemblyHitbox
impl Serialize for AssemblyHitbox
impl StructuralPartialEq for AssemblyHitbox
Auto Trait Implementations§
impl Freeze for AssemblyHitbox
impl RefUnwindSafe for AssemblyHitbox
impl Send for AssemblyHitbox
impl Sync for AssemblyHitbox
impl Unpin for AssemblyHitbox
impl UnsafeUnpin for AssemblyHitbox
impl UnwindSafe for AssemblyHitbox
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