Archiviert
13
0

SPIGOT-5342: Lore lost when deserializing items with no version stored

Dieser Commit ist enthalten in:
md_5 2019-10-06 18:34:51 +11:00
Ursprung c2d1201118
Commit 683bae0670

Datei anzeigen

@ -674,7 +674,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
NBTTagList tagList = new NBTTagList();
for (IChatBaseComponent value : list) {
tagList.add(new NBTTagString(version >= 1803 ? CraftChatMessage.toJSON(value) : CraftChatMessage.fromComponent(value, EnumChatFormat.DARK_PURPLE))); // SPIGOT-4935
// SPIGOT-5342 - horrible hack as 0 version does not go through the Mojang updater
tagList.add(new NBTTagString(0 <= version || version >= 1803 ? CraftChatMessage.toJSON(value) : CraftChatMessage.fromComponent(value, EnumChatFormat.DARK_PURPLE))); // SPIGOT-4935
}
return tagList;