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: StringPlayer-facing delve title.
theme: StringOne-line thematic description.
premise: StringShort narrative premise.
seed: u64The single downstream randomness source (ADR-0006).
target_minutes: u32Informational 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: WorldTimeThe 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: WorldWeatherThe 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: boolWhether 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
impl Clone for WorldContent
Source§impl Debug for WorldContent
impl Debug for WorldContent
Source§impl<'de> Deserialize<'de> for WorldContent
impl<'de> Deserialize<'de> for WorldContent
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>,
Source§impl JsonSchema for WorldContent
impl JsonSchema for WorldContent
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