PaperMC / PaperMC/Paper

Setting world border center outside of max-world-size does not throw error

Open
#9,107 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug upstream: vanilla version: 1.19
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

Setting the center of a world border outside of the server.properties's max-world-size should throw an error or display a warn in console

Observed/Actual behavior

The border change is applied, resulting in the entire world being outside the border

Steps/models to reproduce

Set server.properties max-border-size to 100
Reboot
world.getWorldBorder().setCenter(new Location(world, 300, 0, 300));
world.getWorldBorder().setSize(100);
Observe that the entire world is outside of the border

Plugin and Datapack List

N/A

Paper version

Paper 1.19.4 501

Other

Just writing this up because I got stuck on this for a while and it would be nice if there was some feedback telling me what I was doing is dumb

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WorldBorder setCenter and setSize entry points from the reproduction, and compare their behavior with the server.properties max-border-size setting. Determine how an out-of-bounds center should be reported; done means the invalid setup no longer silently leaves the world outside the border and instead produces the requested error or console warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.