Achievement Descriptions not using defined description (single or multiplayer)

Published by smmmadden on
Status
Can not reproduce
Issue description

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.

painite

sp-UI

sp-chat

For Multiplayers, the UI and Chat achievement notifications are NOT using the defined descriptions of the mod

scheelite

mp-ui

mp-chat

Issue comments

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.

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?

advancements display and console/chat showing correct text from JSON

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.

okay, so is this a bug that you need to enter for CurseForge as the JSON file is created by MCreator?  I would think they'd need more info that I wouldn't have access to?

Not curse forge but Minecraft Forge. I will try to find out what causes this and possibly find a workaround or a fix.

Just a quick question. Do all users have your mod installed when playing multiplayer? Generally, you wouldn't be even able to do this but I was just wondering to make sure.

yes, it is a server and client-side mod.

Single Player - required on client in mods folder.

Multiple Player - required on client and server mods folders.

OK, this is rather strange, but as I said I doubt this is an actual issue with the mod, but rather somewhere on the upper level (Minecraft, Minecraft Forge).

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.

Thank you for the info. I am running out of the ideas at this point. I hope this bug gets resolved in newer versions of Minecraft Forge.

I have not read all the comments, but I think it's just vanilla minecraft. If the title of an advancement is too long, the description won't be shown when getting the advancements so the full title will be shown.

Interesting, I did try that but it doesn't matter about the length. 

Even at 23 characters for the title, I get the 31 character variable that says which achievement to use. LOL