Mojira Archive
MC-125046

"RepairCost" NBT tag is created on any renamed item using anvils which can cause items to not stack properly

The bug

After renaming any item in an anvil the RepairCost tag appears in its tag tag. No matter if the item is a tool or an item with no Damage tag.
This is for example problematic when removing the custom name of an item by using only spaces as name. Afterwards the item has no custom name anymore but does not stack with other items of the same kind due to the RepairCost tag.

How to reproduce

  1. Rename an item in an anvil
  2. Drop it and check its NBT data using /entitydata @e[type=item,c=1] {} or /data get entity @e[type=item,limit=1,sort=nearest] Item.tag and look at the tag:{}. Now it contains RepairCost:0, which doesn't change after renaming the item any amount of times.

Fixed

M

[Mojang] Gnembon

2018-02-10, 08:26 PM

2023-08-16, 05:45 PM

2023-08-16, 05:45 PM

23

8

Confirmed

Normal

Gameplay

Items

RepairCost

Minecraft 1.12.2 - 1.20 Pre-release 2Minecraft 1.12.2, Minecraft 18w06a, Minecraft 18w08a, Minecraft 18w11a, Minecraft 18w21b, Minecraft 18w22c, Minecraft 1.13-pre6, Minecraft 1.13, Minecraft 1.13.1-pre2, Minecraft 1.14, 1.15.2, 20w11a, 20w18a, 20w30a, 1.16.2, 1.17.1, 1.18 Pre-release 1, 1.18 Pre-release 4, 22w06a, 22w18a, 1.19.2, 1.19.3, 23w03a, 1.19.4, 23w12a, 23w18a, 1.20 Pre-release 2

23w33a