1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

fix EntityDataValue

This commit is contained in:
mat 2022-06-24 00:02:03 -05:00
parent ce834aeca5
commit 1640dfe457
2 changed files with 2 additions and 2 deletions

View file

@ -74,7 +74,7 @@ impl McBufReadable for EntityDataValue {
let data_type = i32::var_read_into(buf)?;
Ok(match data_type {
0 => EntityDataValue::Byte(u8::read_into(buf)?),
1 => EntityDataValue::Int(i32::read_into(buf)?),
1 => EntityDataValue::Int(i32::var_read_into(buf)?),
2 => EntityDataValue::Float(f32::read_into(buf)?),
3 => EntityDataValue::String(String::read_into(buf)?),
4 => EntityDataValue::Component(Component::read_into(buf)?),

View file

@ -5,6 +5,6 @@ use packet_macros::GamePacket;
#[derive(Clone, Debug, McBuf, GamePacket)]
pub struct ClientboundSetEntityDataPacket {
#[var]
pub id: i32,
pub id: u32,
pub metadata: EntityMetadata,
}