Mojira Archive
MCPE-183016

Entity effect IDs are translated

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:

  1. Ensure your language is set to English (United States)
  2. Enable "Enable Content Log GUI" in Settings -> General -> Creator
  3. Import the attached add-on: milk.mcaddon
  4. Create a new world with the add-on and the "Beta APIs" experiment enabled
  5. Run /effect @s speed
  6. Drink a bucket of Pasteurized Milk. Notice that the effect was removed
  7. Exit the world, switch to a different language and rejoin the world
  8. Run /effect @s speed
  9. 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.

Unresolved

Elias_Wolfy

2024-06-18, 05:13 PM

2025-01-29, 03:01 PM

6

2

Confirmed

1362904

Script-API

1.21.0, 1.21.2 Hotfix, 1.21.51 Hotfix

-