The advancement checker for Advancement Screenshot is not very robust and fails in some cases.
James103 opened this issue ยท 1 comments
Information
Mod name: Advancement Screenshot
Mod version: 9c376dd
Description
The above code presents the following problems:
- You can take an Advancement Screenshot without gaining an advancement if you send a chat message that contains the following text (replace
Player
with your in-game name): "Player has reached the goal [" - If your language is not English, no advancement screenshots are taken, as the non-English translation does not match the pattern expected by the above code.
- Completing a challenge does not result in an Advancement Screenshot being automatically taken, as the code only checks for the message gained from completing a regular advancement or a goal advancement.
- If
/gamerule announceAdvancements
is false, no advancement screenshot is taken.
The first three can be solved by checking based on the message's translation key instead of the message text itself.
(4) would require checking for incoming advancement toast pop ups or the advancement grant packet itself.
Thanks @James103! I've changed the functionality to a mixin into the advancement toast in version 3.0. This should fix all these issues and have it work for other languages.
https://www.curseforge.com/minecraft/mc-mods/advancement-screenshot/files/all