Paper
Paper copied to clipboard
Setting world border center outside of max-world-size does not throw error
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
I don't believe this is a bug, as this behavior is consistent with vanilla. The /worldborder command will allow this game state, although I agree it is probably undesirable, and frustrating if you weren't aware of it.
That said, have you explored alternatives like Server#getMaxWorldSize which will let you validate this?
I wouldnt really classify it as a bug either, I was just thinking a warning in console or something to that effect would save someone a headache in the future. Its no longer an issue for me.
Hey, I want to implement the warning if this isn't done already...
Hey, I want to implement the warning if this isn't done already...
I don't believe anyone is working on anything for this right now, so feel free to suggest something if you have ideas.
I would just check if the border and center are in the max world size range, and if its not i'll just print a warning msg that says whats wrong with it. For example if the center is outside of the world size or if just part of the border is outside the world.
Being perfectly honest, we have no means for localisation of this stuff, and cramming misc command feedback into random commands just gets into a weird area in terms of "is it worth maintaining this"; This is really something that would be better suited as a feature request to mojang
So don't make it? I don't want to make code that isn't going to be used obviously...
personally, I'm against it, but, I'm not the only voting person on this project; will have to see what others say