mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
SPIGOT-4041: Fix regressed item naming
By: md_5 <git@md-5.net>
This commit is contained in:
parent
9440c6cd75
commit
2f839ed6de
@ -466,10 +466,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
|
||||
@Overridden
|
||||
void applyToItem(NBTTagCompound itemTag) {
|
||||
if (hasDisplayName()) {
|
||||
setDisplayTag(itemTag, NAME.NBT, new NBTTagString(CraftChatMessage.toJSON(displayName)));
|
||||
setDisplayTag(itemTag, NAME.NBT, new NBTTagString(CraftChatMessage.fromComponent(displayName))); // SPIGOT-4041: Should be JSON, but we're still aggressively converting stacks & old+new are both valid
|
||||
}
|
||||
if (hasLocalizedName()){
|
||||
setDisplayTag(itemTag, LOCNAME.NBT, new NBTTagString(CraftChatMessage.toJSON(locName)));
|
||||
setDisplayTag(itemTag, LOCNAME.NBT, new NBTTagString(CraftChatMessage.fromComponent(locName))); // SPIGOT-4041: Should be JSON, but we're still aggressively converting stacks & old+new are both valid
|
||||
}
|
||||
|
||||
if (hasLore()) {
|
||||
|
Loading…
Reference in New Issue
Block a user