Java

Enum Java 

Source
pub enum Java {}
Expand description

Java 版 绝大部分的 NBT 格式

除了 1.20.2+(协议号 >= 764) 及以后 的网路传输 NBT 格式 都是这个

上面说的那玩意 请使用 JavaNetAfter1_20_2

§编码特点

大端, 大端, 还是 xx 的 大端!

Trait Implementations§

Source§

impl NbtReadTrait for Java

Java 版 绝大部分的 NBT 格式

除了 1.20.2+(协议号 >= 764) 及以后 的网路传输 NBT 格式 都是这个

上面说的那玩意 请使用 JavaNetAfter1_20_2

Source§

fn read_nbt_string(reader: &mut NbtReader<'_>) -> NbtResult<String>

reader 读取一个 NBT 字符串
Source§

fn read_i8_array(reader: &mut NbtReader<'_>) -> NbtResult<Vec<i8>>

reader 读取一个 i8(byte) 数组
Source§

fn read_i32_array(reader: &mut NbtReader<'_>) -> NbtResult<Vec<i32>>

reader 读取一个 i32(int) 数组
Source§

fn read_i64_array(reader: &mut NbtReader<'_>) -> NbtResult<Vec<i64>>

reader 读取一个 i64(long) 数组
Source§

fn read_compound( reader: &mut NbtReader<'_>, ) -> NbtResult<Vec<(String, NbtValue)>>

reader 读取一个复合标签类型(Compound)
Source§

fn read_list(reader: &mut NbtReader<'_>) -> NbtResult<Vec<NbtValue>>

reader 读取一个列表类型(List)
Source§

fn from_reader(reader: NbtReader<'_>) -> NbtResult<NbtValue>

Source§

impl NbtWriteTrait for Java

最简单的一集

Source§

fn write_i8_array(writer: &mut Vec<u8>, data: &[i8])

写入一个 i8(byte) 数组
Source§

fn write_i32_array(writer: &mut Vec<u8>, data: &[i32])

写入一个 i32(int) 数组
Source§

fn write_i64_array(writer: &mut Vec<u8>, data: &[i64])

写入一个 i64(long) 数组
Source§

fn write_nbt_string(writer: &mut Vec<u8>, data: &str)

写入一个 NBT 字符串
Source§

fn write_list(writer: &mut Vec<u8>, data: &[NbtValue]) -> NbtResult<()>

writer 写入一个列表类型(List)
Source§

fn write_compound( writer: &mut Vec<u8>, name: Option<&String>, data: &[(String, NbtValue)], ) -> NbtResult<()>

writer 写入一个复合标签类型(Compound) Read more
Source§

fn write_to(value: &NbtValue, buff: &mut Vec<u8>) -> NbtResult<()>

Source§

fn write_to_with_name( name: &str, value: &NbtValue, buff: &mut Vec<u8>, ) -> NbtResult<()>

Source§

fn to_bytes(value: &NbtValue) -> NbtResult<Vec<u8>>

Auto Trait Implementations§

§

impl Freeze for Java

§

impl RefUnwindSafe for Java

§

impl Send for Java

§

impl Sync for Java

§

impl Unpin for Java

§

impl UnwindSafe for Java

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> 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, 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.