pub enum Locomotion {
Ground,
Climber,
Flier,
Aquatic,
}Expand description
How a body gets around.
The compiler DERIVES this from the entity id for every body (spiders climb,
ghasts fly, #minecraft:aquatic swims, and everything else — including every
id the table has never heard of — is Locomotion::Ground, the checked
class). BodyTraversal is the author’s side of the same vocabulary: one
enum, so a declaration and a derivation can never mean different things.
The vocabulary lives in this crate rather than in the compiler because it is
now DSL surface; the compiler re-exports it and owns the derivation table
(compiler::traversal).
Variants§
Ground
Walks, steps and jumps — the default and the CHECKED class.
Climber
Climbs sheer vertical surfaces (vanilla’s Spider class).
Flier
Leaves the ground under its own power.
Aquatic
A member of vanilla’s #minecraft:aquatic tag. A ledger classification
that exempts nothing, which is why it may not be declared
(DW0455) — see BodyTraversal.
Implementations§
Source§impl Locomotion
impl Locomotion
Trait Implementations§
Source§impl Clone for Locomotion
impl Clone for Locomotion
impl Copy for Locomotion
Source§impl Debug for Locomotion
impl Debug for Locomotion
Source§impl<'de> Deserialize<'de> for Locomotion
impl<'de> Deserialize<'de> for Locomotion
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 Locomotion
Source§impl JsonSchema for Locomotion
impl JsonSchema for Locomotion
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