Uploaded image for project: 'Minecraft Realms'
  1. Minecraft Realms
  2. REALMS-11810

Flipped X and Z values on Realms in Scripting API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.20.81 (Bedrock)
    • Unconfirmed
    • Bedrock
    • 1251113

      Explination

      When getting
      block.loaction or
      entity.location
      In the context of a Realm, the resulting Vector3 has its X and Z values flipped.
      Meaning; When one calls for a block's location that is at "x: 15 y: 6 z: -75", the script will return "x: -75 y: 6 z: 15" instead of "x: 15 y: 6 z: -75" 
      8mb.video-5tl-6NKOO6E5.mp4demonstrates this bug as it is on a Realm VS a self-hosted world

       

      With the demonstration, are linked photos of the pack's manifest.json and the script's index.js
      Showing the bug is accuring within the 1.10.0-Stable Version of the Scriting API

      "dependencies": [{ "module_name": "@minecraft/server", "version": "1.10.0" },{ "module_name": "@minecraft/server-ui", "version": "1.1.0" }]
      import { world } from '@minecraft/server';
      world.afterEvents.buttonPush.subscribe(({ source, block }) => {    world.sendMessage('§eButton V3Pos:§7 ' + Object.values(block.location).map(v => v.toFixed(2)).join(' '));    world.sendMessage('§6Player V3Pos:§7 ' + Object.values(source.location).map(v => v.toFixed(2)).join(' '));}); 

      Reproduction

      To reprodude this bug on your own, download the TEST.mcpackpack which is attached below, containing the exact same code as in the screenshots.
      Then activate the pack on a Minecraft Bedrock Edition Realm and simply press a button.
      It should send in the game chat, the coordinates of the button pressed and the player who pressed it and with that you will be able to deduce your self that the X and Z values of the actual coordinates have been switched.
      Yet repeat the same experiment on a normal world, you will obtain the expected value in your game chat, where X stays at the X position and Z at Z's.

        1. 8mb.video-5tl-6NKOO6E5.mp4
          7.09 MB
        2. index.js.png
          index.js.png
          91 kB
        3. manifest.json.png
          manifest.json.png
          166 kB
        4. TEST.mcpack
          0.8 kB

            Unassigned Unassigned
            UrbanMinecraft DeathSinger4221
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: