Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-183016

Entity effect IDs are translated

XMLWordPrintable

    • Icon: Bug 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:

      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.

        1. milk.mcaddon
          6 kB
          Elias_Wolfy
        2. english (working).mp4
          4.15 MB
          Elias_Wolfy
        3. portuguese (not working).mp4
          4.25 MB
          Elias_Wolfy

            Elias_Wolfy Elias_Wolfy
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: