pub struct Prop {
pub block: String,
}Expand description
A prop block for an interact objective or a use trigger (DSL v0.4;
spec-0093 §6.5). The block is the affordance the player interacts with; its
id is validated against the pinned 1.21.11 block registry (DW0193).
When the block is one a hand presses — a lever or a button
(crate::blockshape::is_hand_pressed) — the block IS the detector: the
compiler summons no minecraft:interaction hitbox and the act is vanilla’s
own, reported by the default_block_use advancement criterion at the
block’s cell. Any other block is placed and the invisible hitbox stands in
its cell, because vanilla reports no use of it.
Fields§
§block: StringVanilla block id, with an optional blockstate suffix (e.g.
minecraft:lever[face=floor,facing=north]).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Prop
impl<'de> Deserialize<'de> for Prop
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 Prop
impl JsonSchema for Prop
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 moreimpl StructuralPartialEq for Prop
Auto Trait Implementations§
impl Freeze for Prop
impl RefUnwindSafe for Prop
impl Send for Prop
impl Sync for Prop
impl Unpin for Prop
impl UnsafeUnpin for Prop
impl UnwindSafe for Prop
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