mojira.dev
MC-62550

Worldborder not correctly initialized for the End and Nether

The bug

The worldborder of the End and the Nether uses the default values when you open a world.

How to reproduce

  1. Go to the End

  2. Set the worldborder center to your current position while standing at least 10 blocks away from 0, 0

    /worldborder center ~ ~
  3. Close and reopen the world

  4. Set the worldborder size to 10

    /worldborder set 10
  5. Try to place a block
    → ❌ It disappears after you placed it because the End uses 0, 0 as center

Code analysis

Based on 1.11 decompiled using MCP 9.35 rc1

When the worldborder settings are changed all IBorderListener are informed about the changes and when a WorldServerMulti (End and Nether) is created it adds its listener to the worldborder of the "main" server (WorldServer). When a server is created its init() method is called which reads the worldborder settings for the main server. The problem is that when the settings are read the other servers have not been created yet and because of this have not added any listeners. This causes them to use the default values.

Linked issues

Attachments

Comments 14

Confirmed.
Cannot place any block after /worldborder set 10 and the blocks placed first are gone.

Getting that in the devconsole when leaving that world:

[11:42:32 INFO]: Client> [11:42:32] [Server thread/INFO]: Saving chunks for level 'Ghost Worldborder'/Overworld
[11:42:32 INFO]: Client> [11:42:32] [Server thread/INFO]: Saving chunks for level 'Ghost Worldborder'/Nether
[11:42:32 INFO]: Client> [11:42:32] [Server thread/INFO]: Saving chunks for level 'Ghost Worldborder'/The End
[11:42:34 INFO]: Client> [11:42:34] [Client thread/INFO]: Stopping!
[11:42:34 INFO]: Client> 
[11:42:34 INFO]: Client> SoundSystem shutting down...
[11:42:34 INFO]: Client>     Author: Paul Lamb, www.paulscode.com
[11:42:34 INFO]: Client> 
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 0
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 0
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 3
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 3
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 7, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 8, issue_cycle = -1, ready_cycle = 7
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 0
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 0
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 3
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 3
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 7, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 8, issue_cycle = -1, ready_cycle = 7
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 0
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 0
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 3
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 3
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 4, issue_cycle = -1, ready_cycle = 4
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 5, issue_cycle = -1, ready_cycle = 5
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 6, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 7, issue_cycle = -1, ready_cycle = 6
[11:42:34 INFO]: Client> cur_cycle = 8, issue_cycle = -1, ready_cycle = 7
[11:42:34 INFO]: Client> cur_cycle = 2, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Client> cur_cycle = 3, issue_cycle = -1, ready_cycle = 1
[11:42:34 INFO]: Game ended with no troubles detected (exit code 0)

Confirmed for 1.9.4 Release and 16w20a Snapshot

Confirmed for 1.10 Release

Can confirm for 1.11

4 more comments

Still affects 1.14 full release

Still in 1.14.1 Release

Still in 1.14.2 Pre-Release 1 and 1.14.2 Pre-Release 2

Will this ever get fixed? It's seriously hauling my progress on making a custom map with the world border because when you get to the nether you just immediately get killed... Not to mention the nether portal keeps taking me to the wrong location somehow. I mean come on this has been here for 2 years? This really needs to be fixed soon cause it's not fun using the world border in its current state. I'll have to make some workarounds to fix it myself... If I can. There has to be some location I can find where everything works... I even went inside the border in the nether and instead of taking mini damage I immediately died. But through the portal, I took only half a heart... Which implies, the border is not placed in the right spot. So I just have to find where I don't take damage.

Can confirm in 1.17.1.

marcono1234

Ulraf

Confirmed

Normal

Commands

block, end, mojang_internal_1, nether, server, the_end, world-border

Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 1.8-pre2, Minecraft 15w37a, ..., 21w06a, 21w07a, 21w11a, 1.17 Pre-release 2, 1.17.1

1.18 Pre-release 1

Retrieved