pub enum EquipSlot {
Head,
Chest,
Legs,
Feet,
MainHand,
OffHand,
Body,
Saddle,
}Expand description
One vanilla equipment slot, named exactly as the MobEquipment field that
fills it. The DSL name and the summon-NBT key differ (main_hand vs
mainhand), so both live here and nowhere else.
The set is the pinned game’s equipment-slot set (spec-0067 §2), a
crate::metrics::Provenance::VanillaRule: the eight values the
minecraft:equippable component’s slot field takes, per the Minecraft
Wiki page Data component format/equippable for Java 1.21.11, which are the
serialised names of the client’s EquipmentSlot enum. The pinned item data
is the cross-check, not the source: every slot value an item declares is
asserted to be one of these, and no item declares mainhand, because a hand
takes anything.
Variants§
Head
Head slot.
Chest
Chest slot.
Legs
Legs slot.
Feet
Feet slot.
MainHand
Main-hand slot.
OffHand
Off-hand slot.
Body
Body slot (horse armour, wolf armour, carpet, harness).
Saddle
Saddle slot.
Implementations§
Source§impl EquipSlot
impl EquipSlot
Sourcepub const ALL: [EquipSlot; 8]
pub const ALL: [EquipSlot; 8]
Every slot, in emission order: the two hands, the four armour slots,
then body and saddle. The one enumeration every slot list derives
from — MobEquipment::slots(), the summon equipment / drop_chances
compounds and the drop-strip line.
Sourcepub fn field(self) -> &'static str
pub fn field(self) -> &'static str
The DSL field name (main_hand), for diagnostics and JSON pointers.
Sourcepub fn nbt(self) -> &'static str
pub fn nbt(self) -> &'static str
The 1.21.11 equipment / drop_chances NBT key (mainhand) — also the
game’s own name for the slot, as an equippable component spells it.
Trait Implementations§
impl Copy for EquipSlot
Source§impl<'de> Deserialize<'de> for EquipSlot
impl<'de> Deserialize<'de> for EquipSlot
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 EquipSlot
Source§impl JsonSchema for EquipSlot
impl JsonSchema for EquipSlot
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