Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Player vs OfflinePlayer getBedSpawnLocation

Open Machine-Maker opened this issue 3 years ago • 3 comments

Expected behavior

When calling getBedSpawnLocation on an instance of CraftPlayer or CraftOfflinePlayer the result should be the same (or the discrepancy should be documented and predictable)

Observed/Actual behavior

They are different as shown here

test
[16:05:20 INFO]: [Paper-Test-Plugin] [STDOUT] online: true
[16:05:20 INFO]: [Paper-Test-Plugin] [STDOUT] spawn: Location{world=CraftWorld{name=world_nether},x=-7.5,y=89.0,z=-18.5,pitch=0.0,yaw=0.0}
[16:05:22 INFO]: Machine_Maker lost connection: Disconnected
[16:05:22 INFO]: Machine_Maker left the game
test
[16:05:27 INFO]: [Paper-Test-Plugin] [STDOUT] online: false
[16:05:27 INFO]: [Paper-Test-Plugin] [STDOUT] spawn: Location{world=CraftWorld{name=world_nether},x=-8.0,y=89.0,z=-18.0,pitch=0.0,yaw=0.0}

Steps/models to reproduce

  1. Set your spawn in the world
  2. Log the player's bed spawn loc
  3. log out
  4. get the instance of offlineplayer
  5. log the bed spawn loc

Plugin and Datapack List

none

Paper version

af3b3778f6de06af48de08d41a43565d3ff19976

Other

No response

Machine-Maker avatar May 30 '22 23:05 Machine-Maker

This is already fixed not?

Doc94 avatar Jun 12 '22 17:06 Doc94

Afaik, no. The location is still different.

Machine-Maker avatar Jun 12 '22 17:06 Machine-Maker

Afaik, no. The location is still different.

Ahhh i see now.. the issue is more like by "findRespawnPositionAndUseSpawnBlock" where change the position a few... then not sure if is better try using this in OfflinePlayer or only add in docs for OfflinePlayer about the "exactly" position for bed?

Doc94 avatar Jun 12 '22 18:06 Doc94