-
Bug
-
Resolution: Unresolved
-
None
-
1.21.0, 1.21.2 Hotfix
-
Confirmed
-
Multiple
Technically the typeId of effect should not supposed to be translated, but the typeId of effect are being translated too when you change the language in the game. As a result, reading the typeId of an effect is language dependent, only displayName is supposed to be translated not the typeId.
Steps to reproduce:
- Ensure your language is set to English (United States)
- Enable "Enable Content Log GUI" in Settings -> General -> Creator
- Import the attached add-on: milk.mcaddon
- Create a new world with the add-on and the "Beta APIs" experiment enabled
- Run /effect @s speed
- Drink a bucket of Pasteurized Milk. Notice that the effect was removed
- Exit the world, switch to a different language and rejoin the world
- Run /effect @s speed
- Drink a bucket of Pasteurized Milk. Notice that the effect was not removed and an error appears
Observed result:
The code:
for(const effect of e.source.getEffects()) { console.warn(`id: ${effect.typeId} - name: ${effect.displayName}`); }
Gave this warning in game:
[Scripting][warning]-id: lentidão - name: Lentidão [Scripting][warning]-id: cegueira - name: Cegueira [Scripting][warning]-id: veneno - name: Veneno
The effect typeID and displayName are translated.
Expected result:
The effect typeID is not translated, only its displayName.