![Trofers](https://media.forgecdn.net/avatars/thumbnails/382/156/256/256/637566129446964304.png)
Problems with color
BazZziliuS opened this issue · 4 comments
I made a custom trophy and gave it a color name, but it's not colored on the server, but it's colored in a single game
{
"colors": {
"accent": "#9f3a32",
"base": "#606060"
},
"display": {
"offset": {
"y": 5.5
},
"scale": 2.0
},
"effects": {
"sound": {
"soundEvent": "minecraft:block.bell.use"
}
},
"item": {
"item": "gtceu:uhv_ultimate_battery",
"count": 1
},
"animation": {
"type": "tumbling",
"speed": 0.50
},
"name": [
{ "text": "Тр", "color": "#FF01AFFD" },
{ "text": "оф", "color": "#FF37C1C8" },
{ "text": "ей", "color": "#FF78D585" },
{ "text": " Бе", "color": "#FFBBEB42", "bold": "true" },
{ "text": "ск", "color": "#FFFCF800", "bold": "true" },
{ "text": "он", "color": "#FFFDCB00", "bold": "true" },
{ "text": "еч", "color": "#FFFEA400", "bold": "true" },
{ "text": "но", "color": "#FFFE7D00", "bold": "true" },
{ "text": "сти", "color": "#FFFF6000", "bold": "true" }
]
}
This seems to be an issue with how minecraft serializes and deserializes component colors that have an alpha channel. I'm not sure why this works in singleplayer but doesn't on servers, but you can fix it by removing the alpha value in your colors like this:
"name": [
{ "text": "Тр", "color": "#01AFFD" },
{ "text": "оф", "color": "#37C1C8" },
{ "text": "ей", "color": "#78D585" },
{ "text": " Бе", "color": "#BBEB42", "bold": "true" },
{ "text": "ск", "color": "#FCF800", "bold": "true" },
{ "text": "он", "color": "#FDCB00", "bold": "true" },
{ "text": "еч", "color": "#FEA400", "bold": "true" },
{ "text": "но", "color": "#FE7D00", "bold": "true" },
{ "text": "сти", "color": "#FF6000", "bold": "true" }
]
It's funny, but I added a tooltip with the colors that I threw above and they work fine.
Thanks