Skip to content

Conversation

@Doc94
Copy link
Member

@Doc94 Doc94 commented Apr 18, 2025

This PR close #12372 by adding the support for server to consider the damage, this make the break change where the WorldBorder created by Server/Bukkit set the damage in zero.

@Doc94 Doc94 requested a review from a team as a code owner April 18, 2025 15:13
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Apr 18, 2025
@Doc94
Copy link
Member Author

Doc94 commented Apr 18, 2025

I need a few feedback for the follow case:

If create a WorldBorder and set damage all fine, but if i change the World WorldBorder that change override in client the WorldBorder make you can not notice the virtual WorldBorder and get damage by the virtual... then not sure what is the best aproach for this:

  • Notice this in JavaDoc for make users handle this in plugins
  • Modify the BorderChangeListener in the Level class for add a filter and avoid send changes to players who has virtual worldborder and make Player#setWorldBorder refresh the data

@456dev
Copy link
Contributor

456dev commented Apr 18, 2025

2 makes more sense to me, and makes the API easier to use

Esp if other parts of the server still think the virtual world border is still active / it mixes settings with the update packets

@Doc94
Copy link
Member Author

Doc94 commented Apr 18, 2025

2 makes more sense to me, and makes the API easier to use

Esp if other parts of the server still think the virtual world border is still active / it mixes settings with the update packets

yeah i found two places where the listener are created with the send packets... for PlayerList and Level for that i wanna wait more feedback and then touch that

- } else if (flag && !serverLevel1.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
- double d = serverLevel1.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getDamageSafeZone();
+ } else if (flag && !this.getWorldBorder().isWithinBounds(this.getBoundingBox())) { // Paper - use the first WorldBorder available
+ double d = this.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getDamageSafeZone(); // Paper - use the first WorldBorder available
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nitpicky
But I don't believe "use first world border available" really describes the changes

Maybe smth like "use players worldborder, if present"

@davidmayr
Copy link
Contributor

I personally would like an API to fully disable this. I use the virtual world boarder to simulate the world boarder not being there (as I don't like its visual presence), and I would personally like it to remain this way.

I'd like an API that makes the player receives damage if the player leaves the "real" world boarder, even if his personal world boarder is larger. (Basically make it fully the same as it is now) And I personally think my suggestion should be the default (as otherwise it is sort of a breaking change).

Setting the damage to 0 by default is a good start, but the real world boarder is still not active anymore

@Owen1212055
Copy link
Member

Ngl, it’s so easy to just check it yourself and damage the player urself. I also don’t really see why this is super useful especially as this is described as a sort of “virtual” border.

@electronicboy
Copy link
Member

as I said, the only way I could support this would be if it was an optional override to the main scoreboard, changing behavior here is just bleh, people use the client one for visual stuff and expect the global border to still be active and do stuff, even if not visual to players

@Doc94
Copy link
Member Author

Doc94 commented Apr 18, 2025

Scoreboard?

Then what about just improvement the docs for tell about the none damage is expected and can be handle by the user implementation?

@electronicboy
Copy link
Member

Scoreboard?

long day ;-;

@Owen1212055
Copy link
Member

Yeah I am not quite sure about this. Its called a virtual world border meaning that I would think that this doesnt affect players (with damage, etc) so, I think this is better for plugins to add themselves if they want.

@Doc94
Copy link
Member Author

Doc94 commented Nov 22, 2025

Based in comments close this in favor of #13338

@Doc94 Doc94 closed this Nov 22, 2025
@github-project-automation github-project-automation bot moved this from Awaiting review to Closed in Paper PR Queue Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

Fix virtual world borders

5 participants