Areas (Forge)

Areas (Forge)

890k Downloads

The advancement checker for Advancement Screenshot is not very robust and fails in some cases.

James103 opened this issue ยท 1 comments

commented

Information

Mod name: Advancement Screenshot
Mod version: 9c376dd

Description

https://github.com/ricksouth/serilum-mc-mods/blob/9c376dd1be8ce7c287692f42ae5e991dd0c6f026/sources/Advancement%20Screenshot/src/main/java/com/natamus/advancementscreenshot/events/AdvancementGetEvent.java#L69-L78

The above code presents the following problems:

  1. 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 ["
  2. 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.
  3. 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.
  4. 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.

commented

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