Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +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());
|
||||
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());
|
||||
if (object.getId() != 0) {
|
||||
Type.NBT.write(buffer, object.getTag());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren