Chunky Border (Fabric)

Chunky Border (Fabric)

415k Downloads

More fine-grained border

SlimeDog opened this issue · 6 comments

commented

Spigot 1.16.3
Chunky 1.1.14
ChunkyBorder 1.0.1

Player executed

/mvtp world_luckyblock
/chunky center 0 0
[Chunky] Center changed to 0, 0.
/chunky radius 100
[Chunky] Radius change to 100.
/chunky shape square
[Chunky] Shape changed to square.
/cb add
[Chunky] Added square world border to world with center 0, 0, and radius 100.
/lp group default permission set chunkyborder.bypass.move false
/lp user PLAYER_NAME_ELIDED permission checkinherits chunkyborder.bypass.move
[LuckPerms] PLAYER_NAME_ELIDED has permission chunkyborder.bypass.move set to false in context global. (inherited from default) 
/minecraft:tp PLAYER_NAME_ELIDED 105 9 105

plugins/ChunkyBorder/borders.json

{"world":{"world":"world","centerX":0,"centerZ":0,"radiusX":100,"radiusZ":100,"shape":"square"}}

Note that player was not in the default world "world" when the commands above were executed.
Player can transport to a location outside Chunky border 100,100 in either world.

commented

Admittedly, 100 is a small border, but it is correct for this specific world.

I missed the chucky world command. It would be nice if chunkyborder used the current world by default; please consider that a feature request.

For now, I will use WorldBorder for the border specification, since it is more fine-grained (ie., it works correctly with 100,100 specification).

commented

Ah OK, changing this to a feature request.

ChunkyBorder works exactly the same way that Chunky does, and is mostly designed for use in console, so that is why the world must be specified right now.

It is also designed to match exactly with regions generated in Chunky -- although that is not a requirement and it actually does make a lot of sense to allow people to specify that they want it to be "exact" (although if you do this, it might look a bit weird on Dynmap / BlueMap unless you add extra padding to the radius). I'll look into supporting this soon.

Thanks for the suggestions & testing the plugin. ❤️

commented

105,105 may still be considered inside that border still, since it is currently chunk-aligned.

The border should be the radius in chunks (rounded up) away from the center chunk.
Block 0,0 is in chunk 0,0, which is from world coordinates 0,0 to 16,16
Radius 100 -> 100 / 16 = 6.25 chunks, rounded up to 7 chunks or 112 blocks.

So the border is from 0-112 = -112 to 16+112 = 128.

You shouldn't be able to move or teleport past these coordinates. It might seem like a pretty large margin of error, but that is only because 100 is an extremely small radius for a border.

Try these commands:
/minecraft:tp 127.999 100 127.999
and
/minecraft:tp 128.0 100 128.0

The first one should work, and the second one will teleport you into the border. If that is not the case then maybe there is a bug or another plugin is cancelling it.

commented

It also occurred to me that you mentioned a "world_luckyblock". You may not be in the same world as the border is in (since it is per-world). You need to use chunky world <world> to change worlds if that is the case.

commented

Added in dd803e3.

The border is now "exact" by default, and will only align to chunk boundaries if align-to-chunk is re-enabled in the config.

commented

Thanks. I cannot test until Monday.