#Is it possible to modify an item in a loot-table using item modifiers?

1 messages · Page 1 of 1 (latest)

wicked copper
#

title

pulsar shoalBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

uncut aspen
#

is it possible to use modify an item

#

what does that even mean

#

@wicked copper

pliant valley
#

Yes, loot tables can contain item modifiers. In fact, item modifiers originally stemmed from loot tables. That's what the functions field of items are

wicked copper
#

Is it possible to modify an item in a loot-table using item modifiers?

wicked copper
pulsar shoalBOT
# pulsar shoal <@&1201956957406109788>

<@&1166082198152159386> <@&1202694677766348840>

🙇 Helpers Arise!

Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)

wicked copper
viscid rapids
onyx ridge
#

It's the functions thing

viscid rapids
#

you can expand it with the plus icon

#

itll show you a list of functions

onyx ridge
#

Yea

wicked copper
#

Which function allows me to add item modifiers tho ???

wicked copper
#

That's not what I'm talking about

viscid rapids
#

can you clarify

wicked copper
#

I'm talking about item modifiers (the files that are in namespace/item_modifier

viscid rapids
#

what do you want to do with them

wicked copper
#

I wanna modify the lore component using a custom data component

viscid rapids
#

so you want to copy a custom data string into lore

#

is that custom data coming from the item itself or from storage

wicked copper
#

Item itseld

#

Itself*

viscid rapids
#

and

#

that item comes from a loot table

#

correct?

wicked copper
#

Ye

viscid rapids
#

go to your loot table

#

and change your function for that item

#

instead of it being set_custom_data

#

make it set_lore

#

because putting it in custom data is an unecessary step

wicked copper
#

Alr

#

I'll try thay

#

That*

#

Ty

viscid rapids
#
{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:stone"
        }
      ],
      "functions": [
        {
          "function": "minecraft:set_lore",
          "entity": "this",
          "lore": [
            {
              "text": "I am stone.",
              "color": "gray",
              "italic": false
            }
          ],
          "mode": "replace_all"
        }
      ]
    }
  ]
}
#

This is an example of a loot table that inserts a stone with the lore "I am stone."

wicked copper
#

Okay, is there a way to easily set the custom data component and have it display in the lore without me having to change it ?

viscid rapids
#

just copy your string, store it in notepad

wicked copper
#

I want to modify the custom data component because it is needed for other parts of my datapack

viscid rapids
#

change the function

#

and paste it in

wicked copper
#

💀

#

Okay theb

#

Then*

viscid rapids
#

you can still save your old function

#

but i just tried to copy a string into lore

#

i dont think you can

wicked copper
#

I got it working

#

Ty for the help

#

/resolve

#

Uhhh
Can someone do /resolve ? My discord is bugging out lmao

viscid rapids
#

sure

#

i cant

viscid rapids