pub struct Boundary {
pub margin: u16,
pub message: Option<String>,
pub returns: bool,
}Expand description
A playable-region boundary declaration (DSL v0.6, spec-0013). The region
itself is derived by the compiler (union of the final placed-piece AABBs,
inflated horizontally by margin, unbounded upward, floored at the lowest
placed block − 8) — never authored — so “every anchor is inside” is structural.
Enforcement is a per-second clock that returns any player outside the region to
the last checkpoint (dw:cp) with an actionbar message and a soft sound; no
damage, no items lost.
Fields§
§margin: u16Horizontal breathing room in blocks added around the derived region on
every side (default 16). Range-checked to 0..=64 (DW0321).
message: Option<String>Actionbar message shown on return. Absent = the compiler’s English default.
When set, it is inventoried under l10n key world.boundary.message and is
translated like every other player-facing string.
returns: boolWhether the boundary returns a player who leaves it (spec-0092 §10).
Default true: the per-second clock returns any player outside the region
to the last checkpoint. false keeps the region — every proof that reads
it reads the same box — and emits no clock: the creator’s switch for a
world nobody can leave, where a return only fights a creator flying out
to look at a far view. Legal only where the build proves no body can walk
or swim out of the region (DW0960).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Boundary
impl<'de> Deserialize<'de> for Boundary
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>,
impl Eq for Boundary
Source§impl JsonSchema for Boundary
impl JsonSchema for Boundary
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more