Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-279364

CustomName cannot be removed from block entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.4, 25w02a, 25w03a
    • None
    • Community Consensus
    • Commands
    • Normal
    • Platform

      Using the 'data remove' command cannot remove the 'CustomName' value on block entities, like barrels. This is related to the same issue for normal entities that was fixed in 1.21.4, but the issue still persists for block entities in both 1.21.4 and 25w02a.

       

      Steps to reproduce in 1.21.4:

      1. /setblock 0 4 0 barrel{CustomName:'"example"'}
      1. /data remove block 0 4 0 CustomName
      1. The block still has the name, which can be seen in the GUI as well as '/data get'

      Note for 25w02a:

      • As text components are stored differently, the above command in 25w02a will put the word example in quotes, but it still cannot be removed with '/data remove'

       

      While the '/data remove' command cannot delete the CustomName, it should be noted that invalid data, if set through '/data modify' or '/data merge', sometimes will remove the CustomName. In 1.21.4, setting the CustomName to an empty string will cause the name to be removed, but this will not work in 25w02a as that is now a valid text component. In 25w02a, setting the CustomName to anything that isn't a valid text component will remove the CustomName.

            gegy1000 [Mojang] Gegy
            42Richtofen42 42Richtofen42
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: