Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 15:50:10 +01:00
Flat item should only write NBT when id != 0
Dieser Commit ist enthalten in:
Ursprung
246dc34835
Commit
bd9096ef6d
@ -18,7 +18,9 @@ public class FlatItemType extends BaseItemType {
|
||||
Item item = new Item();
|
||||
item.setId(id);
|
||||
item.setAmount(buffer.readByte());
|
||||
item.setTag(Type.NBT.read(buffer));
|
||||
if (id != 0) {
|
||||
item.setTag(Type.NBT.read(buffer));
|
||||
}
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@ -30,7 +32,9 @@ public class FlatItemType extends BaseItemType {
|
||||
} else {
|
||||
buffer.writeShort(object.getId());
|
||||
buffer.writeByte(object.getAmount());
|
||||
Type.NBT.write(buffer, object.getTag());
|
||||
if (object.getId() != 0) {
|
||||
Type.NBT.write(buffer, object.getTag());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren