#[non_exhaustive]pub enum MetaValue {
Show 29 variants
Byte(i8),
Short(i16),
Int(i32),
VarInt(i32),
Float(f32),
String(Box<str>),
Chat(Box<str>),
OptChat(Option<Box<str>>),
Item(Option<Item>),
Bool(bool),
Rotation([f32; 3]),
BlockPos([i32; 3]),
OptBlockPos(Option<[i32; 3]>),
Direction(i32),
OptUuid(Option<Uuid>),
BlockState(i32),
Nbt(Bytes),
Particle(i32),
VillagerData([i32; 3]),
OptVarInt(i32),
Pose(i32),
Long(i64),
Component(Bytes),
OptComponent(Option<Bytes>),
Stack(Option<ItemStack>),
Enum(u8, i32),
Vector3([f32; 3]),
Quaternion([f32; 4]),
Raw(u8, Bytes),
}Expand description
One entity metadata value (union of the 1.8, 1.12.2 and 1.16.5 serializer types; variants marked 1.16 also occur in 1.12 where 1.12 has that serializer).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Byte(i8)
Byte.
Short(i16)
1.8 short.
Int(i32)
1.8 int.
VarInt(i32)
1.16 VarInt.
Float(f32)
Float.
String(Box<str>)
String (1.8) / string (1.16).
Chat(Box<str>)
1.16 chat component (raw JSON).
OptChat(Option<Box<str>>)
1.16 optional chat component (raw JSON).
Item(Option<Item>)
Item stack (None = empty).
Bool(bool)
1.16 boolean.
Rotation([f32; 3])
Rotation (three floats).
BlockPos([i32; 3])
Block position.
OptBlockPos(Option<[i32; 3]>)
1.16 optional block position.
Direction(i32)
1.16 direction.
OptUuid(Option<Uuid>)
1.16 optional UUID.
BlockState(i32)
1.16 optional block state (0 = none).
Nbt(Bytes)
1.16 NBT (raw copy).
Particle(i32)
1.16 particle (only the particle type id is kept).
VillagerData([i32; 3])
1.16 villager data (type, profession, level).
OptVarInt(i32)
1.16 optional VarInt (0 = none, else value + 1).
Pose(i32)
1.16 / 26.1 pose.
Long(i64)
26.1 long (VarLong).
Component(Bytes)
26.1 text component (the raw network NBT, copied).
OptComponent(Option<Bytes>)
26.1 optional text component (raw network NBT).
Stack(Option<ItemStack>)
26.1 item stack (None = empty; component patch copied out of the packet).
Enum(u8, i32)
26.1 registry or enum value: (serializer id, value) (cat / cow / wolf / frog / pig /
chicken / zombie nautilus variants and sound variants, sniffer / armadillo / copper golem
states, humanoid arm).
Vector3([f32; 3])
26.1 vector (three floats).
Quaternion([f32; 4])
26.1 quaternion (four floats).
Raw(u8, Bytes)
26.1 value kept as its raw wire bytes, copied: (serializer id, bytes) (optional block
state, particle, particle list, optional global position, painting variant, resolvable
profile).