pub enum MetaValue {
Show 21 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),
}Expand description
One entity metadata value (union of the 1.8 and 1.16.5 serializer types).
Variants§
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 pose.
Trait Implementations§
impl StructuralPartialEq for MetaValue
Auto Trait Implementations§
impl !Freeze for MetaValue
impl RefUnwindSafe for MetaValue
impl Send for MetaValue
impl Sync for MetaValue
impl Unpin for MetaValue
impl UnsafeUnpin for MetaValue
impl UnwindSafe for MetaValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more