For Single Players, the UI and Chat achievement notifications are using the defined descriptions of the mod.
Two issues:
1. The Description seems to be ignored in both the UI Achievement window and the chat window. I was expecting to see both, just not sure which one gets shown in UI versus Chat.
2. When in multiplayer mode, neither are working.
For Multiplayers, the UI and Chat achievement notifications are NOT using the defined descriptions of the mod
Issue comments
Thanks but isn't this an issue with using EntityPlayerMP or EntityPlayer since it does seem to partially work in single player mode?
In the screenshots above, it appears that only the "title" is being used for both title and description. When in singleplayer the translate appears to work fine.
However, multiplayer mode the translate is treating the reference to advancements.scheelitepickaxeach.title as literal text instead of a variables value. Should the code be using the mods class prefix so it knows where to find it? For example, my mod uses "tmtmcoresandmore/advancements/***.json" and not "minecraft/advancements/***.json" Just a thought in case this is just missing something simple to pull in the actual values. Thanks again! -Steve
We place advancements in modid/advancements folder as it should be. Minecraft folder is for defaults and placing them here could cause clashes with other mods. This has nothing to do with EntityPlayer as the advancement is only registered by JSON that doesn't even know about the existence of the entity.
sorry, wasn't suggesting moving them to minecraft folder that would be wrong. As I mentioned, the translate in the JSON is treating the advancements.scheelitepickaxeach.title as literal text and not finding the value of this reference.
As a test to prove this theory, I updated the text in the JSON file for just one of the achievements and on MP it worked. I put the literal text I had in MCreator for the title and description in the JSON file. When I tested it in MP I got the correct text visible in the UI (top right corner), the chat had the text I added and in the Advancements Page, I see both values I entered.
So the issue isn't with Minecraft, it's the JSON not getting the value from MCreator elements. As a single player starting "from MCreator" the references can be resolved. However, as a multiplayer option those references are no longer available. So I believe that when the JSON is getting created, it isn't pulling in the text from the mod element itself or the internal names don't match the JSON entry? Shouldn't they just get generated with the correct values to start with if provided?
Of course, I could manually update all the JSON files but that would be silly to do considering I'll have hundreds by the time I'm done.
{
"display": {
"icon": {
"item": "tmtmcoresandmore:hutchinsoniteore"
},
"title": {
"translate": "Hutchinsonite Ore Achievement"
},
"description": {
"translate": "Crafted Hutchinsonite into an Ore"
},
"frame": "task"
},
"criteria": {
"hutchinsoniteoreach": {
"trigger": "hutchinsoniteoreach"
}
},
"parent": "minecraft:story/mine_stone"
}
The "translate" tag instructs Minecraft to load translation from the key. If the key is not found, the key is shown. This is why the text is directly shown in your case. But this is a hacky way and you prevent translations from working this way. The issue is indeed in translations not being loaded, but why they are not loaded is not the reason in this code but in a forge bug most likely.
I created the Achievements using the UI (Plus SIgn +)
Then created a procedure with just the Event trigger shape and "Add achievement to provided player - achievement: ScheeliteOreAch"
Then I updated the Item for ScheeliteOre for "On item creation" to use the new procedure.
Then once in game, I crafted or smelted one of the items and confirmed the achievement worked in the UI (top right of screen), Chat (bottom left of screen) and in the Advancements screen of the Client.
We use standards advancement JSON format (https://minecraft.gamepedia.com/Advancements) so the issue here is not on our side. You can check one of the advancement JSON files in your mod and you can see that the format is the same as on the page linked. This is most likely a Minecraft or Minecraft Forge and we will need to wait for them to fix it.