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

Unable to set item name with loot table "set_nbt" function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 18w10d
    • None
    • Unconfirmed

      set_nbt works well with all nbttags but the name one.
      my loottable file:

      {
          "pools": [
              {
                  "rolls": 1,
                  "entries": [
                      {
                          "type": "item",
                          "name": "minecraft:salmon",
                          "weight": 1,
      					"conditions": [
                                      {
                                          "condition": "entity_properties",
                                          "entity": "this",
                                          "properties": {
                                              "on_fire": false
                                          }
                                      }
                                  ],
                          "functions": [
                              {
                                  "function": "set_count",
                                  "count": {
                                      "min": 1,
                                      "max": 1
                                  }
                              },
      						{
                                  "function": "minecraft:set_nbt",
                                  "tag": "{display:{Name:\"Name\",Lore:[\"Lore\"]}}"
                              }
                          ]
                      },
      				{
                          "type": "item",
                          "name": "minecraft:cooked_salmon",
                          "weight": 1,
      					"conditions": [
                                      {
                                          "condition": "entity_properties",
                                          "entity": "this",
                                          "properties": {
                                              "on_fire": true
                                          }
                                      }
                                  ],
                          "functions": [
                              {
                                  "function": "set_count",
                                  "count": {
                                      "min": 1,
                                      "max": 1
                                  }
                              }
                          ]
                      }
                  ]
              }
          ]
      }

      I will get the item with the Lore "Lore" but the name is still the default name.

            Unassigned Unassigned
            Nebulirion PlanetNebulirion
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: