pub enum TrapEffect {
Dispense {
item: String,
count: u32,
},
}Expand description
What a Trap does when sprung (DSL v0.6, spec-0011). Externally tagged so a
future effect adds a variant; a non-dispense key (e.g. tnt,
release-falling-block, crusher) is an unknown variant → DW0100, keeping
block-destroying and unmodeled effects out of the schema by construction
(spec-0011 non-goals — no hardware the compiler cannot model reaches a world).
Variants§
Dispense
Load the prefab’s pre-wired dispenser with count of item (arrows, tipped
arrows, splash potions). The redstone fires it; terrain is untouched
(spec-0011 “primary lethal”). The item is round-tripped into the dispenser
Items NBT — a deterministic, static payload.
Trait Implementations§
Source§impl Clone for TrapEffect
impl Clone for TrapEffect
Source§impl Debug for TrapEffect
impl Debug for TrapEffect
Source§impl<'de> Deserialize<'de> for TrapEffect
impl<'de> Deserialize<'de> for TrapEffect
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 TrapEffect
impl JsonSchema for TrapEffect
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 TrapEffect
impl PartialEq for TrapEffect
Source§impl Serialize for TrapEffect
impl Serialize for TrapEffect
impl StructuralPartialEq for TrapEffect
Auto Trait Implementations§
impl Freeze for TrapEffect
impl RefUnwindSafe for TrapEffect
impl Send for TrapEffect
impl Sync for TrapEffect
impl Unpin for TrapEffect
impl UnsafeUnpin for TrapEffect
impl UnwindSafe for TrapEffect
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