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

GameTest Framework - mojang-minecraft - Enchantment does not get added even though API reports that it does

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.18.31, 1.19.0, 1.19.2 Hotfix, 1.19.10, 1.19.11 Hotfix, 1.19.20
    • Unconfirmed
    • Windows

      Summary:
      When adding or removing enchantments via the GameTest Framework -> mojang-minecraft API, nothing happens even though the API reports success and/or no errors.

      Steps to Reproduce:
      1. Create a simple js script (the example I used is screenshotted below) that creates an item, adds a valid enchantment to it, and then adds it to the player's inventory.
      2. Load into any world seed.
      3. Connect the Visual Studio Code debugger.
      4. Put a breakpoint where the success of the adding enchantment API can be viewed.
      5. In the game, do whatever is needed to cause the code to run (for my example code, simply right-click on any block).
      6. Go back to VS Code and observe that the breakpoint has been hit.
      7. Press F5 to leave the code and return to the game.

      Observed Results:

      The player has been given an unenchanted item, even though the API reported the enchantment was successfully added.

      Expected Results:

      The player has been given an enchanted item, because the API reported the enchantment was successfully added.

      Screenshots/Videos:

      Notes:
      Similarly, if using the removeEnchantment API on an item with an enchantment, it throws no errors (does not return anything as it is a void function) and the enchantment is not removed.

        1. image-2022-06-04-16-11-56-092.png
          64 kB
          BedrockChallenges
        2. image-2022-06-04-16-12-02-643.png
          463 kB
          BedrockChallenges

            BedrockChallenge BedrockChallenges
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: