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

"nbt" component on item modifier doesn't change to a displayable text.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 21w08b
    • Unconfirmed
    • (Unassigned)

      The Plobrem

      When a "nbt" component applies on an item via /item modify, the component keeps there so that the item doesn't show about this.

      How it work

      1. Set up an entity, a block, and a storage that can conclude NBT tag.

      summon creeper ~ ~ ~ {CustomName:'{"text":"Your MOM"}'}
      setblock 0 4 0 oak_sign{Text1:'{"text":"The text"}'}
      data modify storage foo:test text set value "This is a simple text."

      2. Set up item modifiers on the following:

      // entity
      [
        {
          "function""minecraft:set_name",
          "name": {
            "nbt""CustomName",
            "entity""@s",
            "interpret"true
          }
        }
      ] 
      // block
      [
        {
          "function""minecraft:set_name",
          "name": {
            "nbt""Text1",
            "block""0 4 0",
            "interpret"true
          }
        }
      ] 
      // storage
      [
        {
          "function""minecraft:set_name",
          "name": {
            "nbt""text",
            "storage""foo:test"
          }
        }
      ] 

      3. /item modify your item.

      4. Read the name of you item.

            Unassigned Unassigned
            Flesy_Z FlesyZ
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: