mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 12:41:50 +01:00
SPIGOT-4041: Fix regressed item naming
This commit is contained in:
parent
6fa4ae693e
commit
65bc676ed0
1 changed files with 2 additions and 2 deletions
|
@ -466,10 +466,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
|
||||||
@Overridden
|
@Overridden
|
||||||
void applyToItem(NBTTagCompound itemTag) {
|
void applyToItem(NBTTagCompound itemTag) {
|
||||||
if (hasDisplayName()) {
|
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()){
|
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()) {
|
if (hasLore()) {
|
||||||
|
|
Loading…
Reference in a new issue