Skip to main content

WorldContent

Struct WorldContent 

Source
pub struct WorldContent {
Show 19 fields pub title: String, pub theme: String, pub premise: String, pub seed: u64, pub target_minutes: u32, pub areas: Vec<Area>, pub languages: Vec<String>, pub time: WorldTime, pub weather: WorldWeather, pub difficulty: Option<WorldDifficulty>, pub horizon: Option<Horizon>, pub view_distance: Option<u8>, pub atmospheres: Vec<Atmosphere>, pub boundary: Option<Boundary>, pub outro: Option<String>, pub min_players: Option<u8>, pub textures: Vec<TextureOverride>, pub require_resource_pack: bool, pub respawn_wait: Option<RespawnWait>,
}
Expand description

Stage 1 payload: setting, seed and the areas that make up the delve.

Fields§

§title: String

Player-facing delve title.

§theme: String

One-line thematic description.

§premise: String

Short narrative premise.

§seed: u64

The single downstream randomness source (ADR-0006).

§target_minutes: u32

Informational pacing target in minutes (v0: not enforced).

§areas: Vec<Area>

The areas the delve is made of; each binds exactly one of prefab / prefab_pool.

A campaign declares its placement in exactly one document, so this list is empty on a site-plan campaign (DW0839): where a site-plan.json is present the plan is the placement authority, its one place is area/site, and declaring areas[] as well gives every question about where something is two answers. Empty is therefore a legitimate and common value, not a campaign that forgot to place anything.

§languages: Vec<String>

Additional author-declared translation languages (BCP-47-style codes, e.g. ["zh-cn"]). English (en) is implicit, always canonical, and is never listed here (spec-0001 i18n addendum). Absent or empty = English-only. Every declared language must ship a fully-covering l10n/<code>.json sidecar (DW0180/DW0181). Stage docs themselves stay pure English.

§time: WorldTime

The hour this delve is played at (DSL v0.5, spec-0010; required since spec-0061). Dimension-global; frozen by environment sealing (advance_time false) so the set state persists. Affects sky attenuation in the compiler’s assembled-light model.

Required, and it has no default. “This delve is played at noon” is a design decision, and a mechanism that supplies one silently when the author said nothing is exactly what CLAUDE.md forbids a primitive from encoding — the same ruling spec-0060 §4.1 made for walk_y. It is also the world half of the comparison DW0890 makes against the approved design’s rows, so every campaign has to state it for the comparison to have two sides. Emission is unchanged: time set <kw> was always emitted, so a campaign that already declared this builds byte-identically.

§weather: WorldWeather

The weather this delve is played in (DSL v0.5, spec-0010; required since spec-0061). Dimension-global; frozen by environment sealing (advance_weather false). Rain and thunder attenuate effective sky brightness in the assembled-light model.

Required, with no default, for the reason WorldContent::time gives. Emission is unchanged: weather <kw> is emitted only for a declared non-clear weather, because clear is vanilla’s own state.

§difficulty: Option<WorldDifficulty>

Declared combat difficulty (DSL v0.6). Absent = the compiler’s historical derivation — easy when the campaign fields any wave, peaceful when it fields none — which is what keeps every campaign written before this field byte-identical. Declaring it overrides the derivation for both the shipped server.properties and a /difficulty in the sealing baseline, so the declaration also holds when the datapack is dropped into somebody else’s world.

peaceful is rejected (DW0468). Raising difficulty changes the damage players take — easy halves it — so combat arithmetic tuned under the old implicit easy must be redone.

§horizon: Option<Horizon>

The scenic horizon: the ground and the sky the map stands in (spec-0026). Absent or void is the void world. ocean swaps the world generator for a deterministic superflat sea (bedrock/stone/water, sea level y=62) and drops the area datum to y=60 so island pieces meet the sea at their authored waterline. valley rings the map in a generated mountain annulus — the one base that builds terrain rather than picking a generator. Either a string shorthand or the object form {base, …params}; see Horizon.

§view_distance: Option<u8>

How far a player must be able to see, in chunks (spec-0091): the server’s view-distance, declared by the campaign whose far views need it. A thing farther from a body than the served radius is never sent to that body’s client, so a landmark meant to be seen from across the map is a declaration here, not a hope. Absent = the engine’s floor (crate::viewdistance::FLOOR, 10 chunks = 160 blocks), which every proof in the engine is written against; declared in FLOOR..=CEILING (vanilla serves at most 32). A camera, a sightline, a view or a cutscene shot aimed past the served radius is refused (DW0956); the build states the heap the declared distance costs the host at the player cap, and the hosting side meets it.

§atmospheres: Vec<Atmosphere>

The skies a place can stand under (spec-0080). Each one is declared once, here, beside time, weather and horizon — the other statements about the sky the party stands under — and ships as a datapack biome (<ns>:atmosphere/<kebab>) built from the pinned game’s environment attributes. A place carries one from the first tick (Area::atmosphere, boxes[].atmosphere), and a beat repaints a volume with another (Verb::SetAtmosphere). Absent or empty: every cell stands in the horizon’s biome. One no place carries and no beat paints is refused (DW0930).

§boundary: Option<Boundary>

Playable-region boundary (DSL v0.6, spec-0013). When present, the compiler derives a region from the placed geometry and a per-second clock returns any player who leaves it to the last checkpoint. Required when horizon is ocean (an infinite swimmable sea with no return rule is DW0320).

§outro: Option<String>

The closing line on the campaign-completion advancement — the last player-visible sentence of the delve (DSL v0.6). Player-visible, so it is l10n-inventoried as world.outro and sidecars translate it. Absent = the finale quest’s goal, which is already both campaign-derived and inventoried; the description was previously the hardcoded English “You left the keep.” on every delve, whatever its theme or language.

§min_players: Option<u8>

The party size this delve requires (DSL v0.6, spec-0018). Absent = 1: a party of one is always legal and every pre-0.6 campaign keeps that reading. A design whose beats genuinely need n players — two rooms whose switches are two arms of one AND-join — declares min_players: n (max 4), and the lobby then refuses to start below it: the class-selection dialog stays shut and the waiting players get a party-count actionbar instead.

Progression is party state either way (spec-0018), so this is a declaration of intent, not a mechanism: it makes a mandatory-n design first-class and turns on the analyzer’s n-agent division proof. Out of 1..=4 is DW0370.

§textures: Vec<TextureOverride>

The vanilla textures this delve replaces (spec-0084). Each row names one texture the pinned client ships and the campaign’s own image for it, at textures/<id>.png in the campaign directory; the build bakes it into the resource pack at the vanilla path, so it is drawn wherever the client draws that texture — every mob of that kind, the moon over every area — for every player who accepted the pack. Absent or empty = vanilla’s look.

§require_resource_pack: bool

Whether a player must accept this delve’s resource pack to play it (spec-0084 §11). true is emitted as require-resource-pack=true: a player who declines is disconnected by the server. Absent or false = the pack is offered and may be declined, in which case the player reads English and sees vanilla’s textures. A host may still set the server’s own flip (itzg’s RESOURCE_PACK_ENFORCE), which is obeyed as given.

§respawn_wait: Option<RespawnWait>

A fallen player waits before rejoining (spec-0077). After clicking Respawn, a player whose party still has somebody in play watches a teammate as a spectator for seconds, and counts as down for the party wipe while they wait. Absent = no wait, and emission is byte-identical to a campaign that never had the field. Needs a checkpoint or bonfire to come back to; seconds outside 1..=120, or no checkpoint, is DW0925.

Trait Implementations§

Source§

impl Clone for WorldContent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WorldContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for WorldContent

Source§

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 WorldContent

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

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

Generates a JSON Schema for this type. Read more
Source§

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 more
Source§

impl PartialEq for WorldContent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for WorldContent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for WorldContent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.