This commit is contained in:
parent
6f0dae932b
commit
e93264472d
1 changed files with 7 additions and 0 deletions
|
@ -17,6 +17,13 @@ public class WorldBorderExpanderListener implements Listener {
|
|||
public void onWorldLoad(WorldLoadEvent event) {
|
||||
ServerLevel level = ((CraftWorld) event.getWorld()).getHandle();
|
||||
|
||||
if (level.getWorldBorder().getSize() < 5.9999968E7D) {
|
||||
// if the world border was modified we don't touch it
|
||||
return;
|
||||
}
|
||||
|
||||
level.getWorldBorder().setAbsoluteMaxSize(30000000);
|
||||
// to align with player hitbox because player can't go beyond 30m - 1 and player's hitbox is 0.6 wide so we make it "hug" the border
|
||||
level.getWorldBorder().setSize(59999998.6);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue