Paper icon indicating copy to clipboard operation
Paper copied to clipboard

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

Open GriffinCodes opened this issue 2 years ago • 8 comments

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

GriffinCodes avatar Apr 09 '23 06:04 GriffinCodes

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?

pop4959 avatar Apr 09 '23 16:04 pop4959

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.

GriffinCodes avatar Apr 10 '23 23:04 GriffinCodes

Hey, I want to implement the warning if this isn't done already...

JMBoy01 avatar May 22 '23 13:05 JMBoy01

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.

pop4959 avatar May 22 '23 23:05 pop4959

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.

JMBoy01 avatar May 23 '23 10:05 JMBoy01

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

electronicboy avatar May 23 '23 10:05 electronicboy

So don't make it? I don't want to make code that isn't going to be used obviously...

JMBoy01 avatar May 23 '23 10:05 JMBoy01

personally, I'm against it, but, I'm not the only voting person on this project; will have to see what others say

electronicboy avatar May 23 '23 10:05 electronicboy