Skip to main content

EntityMetadataValueType

Enum EntityMetadataValueType 

Source
pub enum EntityMetadataValueType {
Show 43 variants Byte = 0, VarInt = 1, VarLong = 2, Float = 3, String = 4, TextComponent = 5, OptionalTextComponent = 6, Slot = 7, Boolean = 8, Rotations = 9, Position = 10, OptionalPosition = 11, Direction = 12, OptionalLivingEntityReference = 13, BlockState = 14, OptionalBlockState = 15, Particle = 16, Particles = 17, VillagerData = 18, OptionalVarInt = 19, Pose = 20, CatVariant = 21, CatSoundVariant = 22, CowVariant = 23, CowSoundVariant = 24, WolfVariant = 25, WolfSoundVariant = 26, FrogVariant = 27, PigVariant = 28, PigSoundVariant = 29, ChickenVariant = 30, ChickenSoundVariant = 31, ZombieNautilusVariant = 32, OptionalGlobalPosition = 33, PaintingVariant = 34, SnifferState = 35, ArmadilloState = 36, CopperGolemState = 37, WeatheringCopperState = 38, Vector3 = 39, Quaternion = 40, ResolvableProfile = 41, HumanoidArm = 42,
}
Expand description

Numeric value-type selector used by an entity metadata entry.

Storing this selector separately from a payload is unnecessary and could permit mismatches. EntityMetadataValue is therefore the primary wire value; this enum is exposed for inspection and registry mapping, and is returned by EntityMetadataValue::value_type.

Variants§

§

Byte = 0

The Byte value type (ID 0).

§

VarInt = 1

The VarInt value type (ID 1).

§

VarLong = 2

The VarLong value type (ID 2).

§

Float = 3

The Float value type (ID 3).

§

String = 4

The String value type (ID 4).

§

TextComponent = 5

The Text Component value type (ID 5).

§

OptionalTextComponent = 6

The Optional Text Component value type (ID 6).

§

Slot = 7

The Slot value type (ID 7).

§

Boolean = 8

The Boolean value type (ID 8).

§

Rotations = 9

The Rotations value type (ID 9).

§

Position = 10

The Position value type (ID 10).

§

OptionalPosition = 11

The Optional Position value type (ID 11).

§

Direction = 12

The Direction value type (ID 12).

§

OptionalLivingEntityReference = 13

The Optional Living Entity Reference value type (ID 13).

§

BlockState = 14

The Block State value type (ID 14).

§

OptionalBlockState = 15

The Optional Block State value type (ID 15).

§

Particle = 16

The Particle value type (ID 16).

§

Particles = 17

The Particles value type (ID 17).

§

VillagerData = 18

The Villager Data value type (ID 18).

§

OptionalVarInt = 19

The Optional VarInt value type (ID 19).

§

Pose = 20

The Pose value type (ID 20).

§

CatVariant = 21

The Cat Variant value type (ID 21).

§

CatSoundVariant = 22

The Cat Sound Variant value type (ID 22).

§

CowVariant = 23

The Cow Variant value type (ID 23).

§

CowSoundVariant = 24

The Cow Sound Variant value type (ID 24).

§

WolfVariant = 25

The Wolf Variant value type (ID 25).

§

WolfSoundVariant = 26

The Wolf Sound Variant value type (ID 26).

§

FrogVariant = 27

The Frog Variant value type (ID 27).

§

PigVariant = 28

The Pig Variant value type (ID 28).

§

PigSoundVariant = 29

The Pig Sound Variant value type (ID 29).

§

ChickenVariant = 30

The Chicken Variant value type (ID 30).

§

ChickenSoundVariant = 31

The Chicken Sound Variant value type (ID 31).

§

ZombieNautilusVariant = 32

The Zombie Nautilus Variant value type (ID 32).

§

OptionalGlobalPosition = 33

The Optional Global Position value type (ID 33).

§

PaintingVariant = 34

The Painting Variant value type (ID 34).

§

SnifferState = 35

The Sniffer State value type (ID 35).

§

ArmadilloState = 36

The Armadillo State value type (ID 36).

§

CopperGolemState = 37

The Copper Golem State value type (ID 37).

§

WeatheringCopperState = 38

The Weathering Copper State value type (ID 38).

§

Vector3 = 39

The Vector3 value type (ID 39).

§

Quaternion = 40

The Quaternion value type (ID 40).

§

ResolvableProfile = 41

The Resolvable Profile value type (ID 41).

§

HumanoidArm = 42

The Humanoid Arm value type (ID 42).

Trait Implementations§

Source§

impl Clone for EntityMetadataValueType

Source§

fn clone(&self) -> EntityMetadataValueType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EntityMetadataValueType

Source§

impl Debug for EntityMetadataValueType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EntityMetadataValueType

Source§

impl Hash for EntityMetadataValueType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for EntityMetadataValueType

Source§

fn eq(&self, other: &EntityMetadataValueType) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl ProtocolEnum for EntityMetadataValueType

Source§

type Repr = VarInt

The numeric protocol type used for this enum on the wire.
Source§

fn discriminant(&self) -> i128

Returns this variant’s numeric discriminant.
Source§

fn to_repr(&self) -> Option<Self::Repr>

Converts this variant to its wire representation. Read more
Source§

fn from_repr(repr: Self::Repr) -> Option<Self>

Maps a decoded wire representation to a declared enum variant. Read more
Source§

impl StructuralPartialEq for EntityMetadataValueType

Source§

impl TypeCodec for EntityMetadataValueType

Source§

fn encode(&self, writer: &mut impl Write) -> Result<(), CodecError>

Encodes this value to the writer.
Source§

fn decode(reader: &mut impl Read) -> Result<Self, CodecError>

Decodes this value from the reader.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ContextualCodec for T
where T: TypeCodec,

Source§

fn encode_with_context( &self, writer: &mut impl Write, _context: &Context, ) -> Result<(), CodecError>

Encodes this value using context supplied by its enclosing structure.
Source§

fn decode_with_context( reader: &mut impl Read, _context: &Context, ) -> Result<T, CodecError>
where T: Sized,

Decodes this value using context supplied by its enclosing structure.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.