Datapack specifications are different from vanilla.

goddy_516

New member
Jun 18, 2023
3
0
1
I think this is important information for anyone who is planning to run datapack on paperMC.

I ran this in the current 1.21.4 version, but I wanted to change the lore text of an item using the item_modifier in the datapack.
However, the console log showed that paperMC only accepts String type lore statements.

yeah?
If you write it as a String type
{ "functions": [ { "function": "minecraft:set_components", "components": { "minecraft:lore": [ "Hello", "World!!" ] } } ] }

This method of description does not allow you to specify color, bold, or translation.

Why is paperMC a Strings type, even though the Minecraft wiki says to write it as a component type?
How to write the lore statement for components

Item_Modifier wiki

I think these specs need to be adapted to fit paperMC's use in vanilla Minecraft.
If you follow the URL written on the wiki, you will eventually arrive at the text component format.
Text component format

{ "functions": [ { "function": "minecraft:set_components", "components": { "minecraft:lore": [ { "text": "Hello", "color": "#ff0000" }, { "translate": "example.hello", "fallback": "World!!", "color": "#0000ff" } ] } } ] }
This syntax should be allowed

I'm not looking for this String type issue, but I don't think it's specific to item_modifier.
Considering the above, what are your thoughts?
Depending on your opinions, we will consider making suggestions in the feedback.
 

goddy_516

New member
Jun 18, 2023
3
0
1
hey, that sounds wrong, it shouldn't differ. can you please open an issue on github with all needed detail so that the team can look into it and fix if needed?
If I'm wrong, I'm going to close the thread because it's too much trouble.
I just thought it didn't match vanilla when I checked it out because I got an error when I described it as described in the wiki.
I am thinking of writing to github if there is a chance it will be modified.
 
Last edited:

goddy_516

New member
Jun 18, 2023
3
0
1
I was saying it should be the same as vanilla, and if it isn't, that sounds like a bug and should be reported on GitHub so we can fix it :)
Understood.
Sorry, English is not my first language, so I might have taken it to mean something else.
I will report it on github.