1

I need some help with a data pack...live_help

Garfieldwxg55 6/15/20 11:39 am history
164
6/17/2020 1:39 pm
Hi everyone, so I have been editing a data pack that I found which claimed it was designed for Minecraft 1.14, anyway I've been using it on 1.16, and it works fine, except for one thing, the custom artist/disc names for the custom music discs have stopped working. Everything else works fine, custom songs play etc, its just the custom names, they all show up as "C148 - 11" instead of whatever artist wrote the song and the song itself. I have included the relevant text (I can't seem to upload the actual documents, so I've included them in text form). Any help/explanation would be appreciated!

1st reference, mcfunction file (probably most important):
execute as @s[​scores={heldDisc=1}] run replaceitem entity @s weapon.mainhand minecraft:music_disc_11{CustomModelData:1, HideFlags:32, display:{Lore:["\"§7Moorziey - Demise\""]}}
execute as @s[​scores={heldDisc=2}] run replaceitem entity @s weapon.mainhand minecraft:music_disc_11{CustomModelData:2, HideFlags:32, display:{Lore:["\"§7worldpeace - Medivo\""]}}
execute as @s[​scores={heldDisc=3}] run replaceitem entity @s weapon.mainhand minecraft:music_disc_11{CustomModelData:3, HideFlags:32, display:{Lore:["\"§7MJohn Williams - Duel of the Fates\""]}}

2nd reference, JSON file (seems to mostly relate to adding the custom discs to the creepers loot table, but it does reference the names):
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 0.0,
"max": 2.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:looting_enchant",
"count": {
"min": 0.0,
"max": 1.0
}
}
],
"name": "minecraft:gunpowder"
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:tag",
"weight": 1,
"name": "minecraft:music_discs",
"expand": true
},
{
"type": "minecraft:item",
"weight": 1,
"name": "minecraft:music_disc_11",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "{CustomModelData:1, HideFlags:32, display:{Lore:[\"\\\"§7Moorziey - Demise\\\"\"]}}"
}
]
},
{
"type": "minecraft:item",
"weight": 1,
"name": "minecraft:music_disc_11",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "{CustomModelData:2, HideFlags:32, display:{Lore:[\"\\\"§7worldpeace - Medivo\\\"\"]}}"
}
]
},
{
"type": "minecraft:item",
"weight": 1,
"name": "minecraft:music_disc_11",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "{CustomModelData:3, HideFlags:32, display:{Lore:[\"\\\"§7John Williams - Duel of the Fates\\\"\"]}}"
}
]
}
],
"conditions": [
{
"condition": "minecraft:entity_properties",
"predicate": {
"type": "#minecraft:skeletons"
},
"entity": "killer"
}
]
}
]
}
Posted by
Garfieldwxg55
Level 2 : Apprentice Miner
1

  Have something to say?

JoinSign in

1

One_Nose
06/17/2020 1:39 pm
He/Him • Level 59 : Grandmaster Dragonborn Hero
history
I have heard about that § symbol but never actually used it. Here is how I format texts, and it works on 1.16 for sure. I have heard about something they changed in 1.16 about formatting. Here is an example to a custom name:
{display:{Name:'{"text":"Duel of the Fates"}'}}To color it, you can add a comma and "color", like here:
{Name:'{"text":"Duel of the Fates","color":"red"}'}You can also control italic/bold/etc. using true/false. For example, this is formatted not to be italic:
{Name:'{"text":"Duel of the Fates","color":"red","italic":false}'}
Here is the full NBT. Change like this all of the texts in the function.
{CustomModelData:3, HideFlags:32, display:{Lore:["\"§7John Williams - Duel of the Fates\""]}}Becomes:{CustomModelData:3, HideFlags:32, display:{Lore:['{"text":"John Williams - Duel of the Fates","color":"gray","italic":false}']}}
I have also added italic false so your text won't be italic.

Hope it helps. Feel free to comment if you have any questions or issues.
2

Welcome