pub enum MobDrop {
Slot(SlotDrop),
Item(ItemDrop),
}Expand description
One declared drop of an elite or boss (DSL v0.9).
A mob may wear many pieces; what it leaves behind is a declared subset, usually one piece and never automatically everything. Two forms, told apart by which field is present:
{ "slot": "main_hand" } // its axe
{ "item": "minecraft:tripwire_hook", "name": "Gate Key" } // a quest itemA slot entry must name a slot the same entity’s equipment really fills
(DW0490) — the drop is the piece the player has been looking at through
the whole fight, so the two declarations cannot disagree. An item entry is
a token the fight yields rather than wears, and rides the entity’s own
death loot table.
Undeclared slots keep drop chance 0.0 — byte-for-byte today’s behaviour, and
the no-grind constitution’s guarantee that an ordinary kit is never farmable.
Variants§
Slot(SlotDrop)
A worn/held piece, named by its equipment slot.
Item(ItemDrop)
A quest token the fight yields (not worn).
Implementations§
Source§impl MobDrop
impl MobDrop
Sourcepub fn slot(&self) -> Option<EquipSlot>
pub fn slot(&self) -> Option<EquipSlot>
The equipment slot this entry names, or None for a quest-item drop.
Sourcepub fn item(&self) -> Option<&str>
pub fn item(&self) -> Option<&str>
The item id this entry names, or None for a worn-piece drop.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MobDrop
impl<'de> Deserialize<'de> for MobDrop
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 MobDrop
impl JsonSchema for MobDrop
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