Mojira Archive
MC-217108

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

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.

Awaiting Response

FlesyZ

2021-02-26, 07:42 AM

2021-10-31, 01:19 AM

2021-10-31, 01:19 AM

1

0

Unconfirmed

(Unassigned)

/item, modify, nbt-component

21w08b

-