mojira.dev
MCPE-239152

World.getEntity().location & Dimension.getEntities()[].location for same entity return different values

import { system, world } from "@minecraft/server"
world.afterEvents.playerJoin.subscribe(event => {
  system.runTimeOut(() => {
    let player = world.getEntity(event.playerId)
    console.log(player.location.x, player.dimension.getEntities({id:event.playerId})[0].location.x)
  }, 80)
})

Steps to reproduce

  1. add the pack with code above to a world

  2. make sure the error log is enabled

  3. enter the world and wait for seconds

Observed result

The output has 2 different values where the first value is consistent with the coordinate in game.

Expected result

The output has 2 same values that consistent with the coordinate in game.

Attachments

Comments 4

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

Could you please attach an example addon showcasing the issue?

Just a reminder, to make your bug report as effective as possible, please try and include the following steps to reproduce the problem:

Steps to Reproduce:
1.
2.
3.

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

[media]

To correctly show the log, it will be posted in 4 seconds after player join.

Thank you for the attached MCPack!

Could you please elaborate what error appears when the issue occurs?

As I said in the report, there are 2 different values appear in the error log which should be the same.

mingwangdada

(Unassigned)

Unconfirmed

Multiple

26.21 Hotfix

Retrieved