pub struct KitItem {
pub item: String,
pub count: u32,
pub name: Option<String>,
pub carrier: Option<Carrier>,
pub flask: bool,
pub contents: Option<PotionContents>,
}Expand description
One item in a class kit.
Note: lore, enchantments and attributes are reserved for M2/M3
(spec-0001). They are intentionally not defined as fields in v0, so a
document using them is rejected as an unknown field (DW0100).
Fields§
§item: StringVanilla item id, validated against the pinned 1.21.11 registry.
count: u32Stack count.
name: Option<String>Optional display name.
carrier: Option<Carrier>Who gets it (DSL v0.6, spec-0018). Absent = Carrier::All. A class kit is
per-player gear by construction — every player who picks the class gets the
kit — so carrier here marks a party-unique kit item: exactly one copy
enters the party, given to the first player to pick this class.
flask: boolThe flask (DSL v0.8, spec-0016 §1): this kit
entry is the class’s recovery item, and resting at a bonfire replenishes
it to exactly count. A campaign that places a bonfire and declares no
flask anywhere in its kits is DW0476 — the estus loop is what makes
dying an investment, so a souls campaign without one is a build error, not
a design choice. Absent on every pre-0.8 kit → emission byte-identical.
contents: Option<PotionContents>What is in the bottle (DSL v0.8, spec-0016 §1): the vanilla
minecraft:potion_contents component of a
potion-bearing item (POTION_BEARING_ITEMS). Without it a
minecraft:potion is the Uncraftable Potion — a bottle that heals
nothing — which is exactly the placeholder flask this field exists to
abolish, so at dsl_version 0.8.0 a potion-bearing kit item that declares
no contents is DW0487.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KitItem
impl<'de> Deserialize<'de> for KitItem
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 KitItem
impl JsonSchema for KitItem
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