World Border

Adds the /scaleborder command (and more) limiting the world size

WARNINGS:

If you want an example of how this can be used creatively, you can check out my Border Expansion Addon

Now that we got that out of the way, we can finally get to the stuff you really care about.

Introduction

I've wanted a world border addon for as long as I can remember. Being able to limit your world size like on java edition can make interesting experiences, especially after Mojang got rid of the old world type. But the problem lies in that every world border addon I've downloaded in the past had some (or all) of these issues:

None of these issues are present in this addon

  1. The border was entirely made up of blocks. This meant that mobs couldn't get in, nor could the size be dynamically changed.
  2. Low customizablity, they often had preset sizes and you couldn't change anything about how the border worked
  3. Spawn would automatically set to 0,0 forcing the player to spawn in conditions they otherwise wouldn't
  4. Border visibility was wrong, they were either invisible, or extremely visible. Both of which caused annoyance.

 

No hate to the original creators btw, those addons were amazing at the time.

How it works

When the player gets close to the border, it will start displaying flying red particles around them. This will only be visible on their screen. And does not need a resource pack to work, as it uses vaniilla particles. The max distance needed to show these particles, and the spread of them are editable using gamerules.

Any player who still passes the border will have a couple things happen to them:

  1. They will recieve an error message telling them they can't cross the border
  2. They will be teleported back to their last safe location, unless there is no safe location. Then they will either
  • Teleport back to their spawn (if it's inside the border)
  • Teleport to the world spawn (if it's safe to do so)
  • Or damage them until they either find a way back in, or die.

Commands

Border size can be set using /scaleborder, you can use set, add, subtract, multiply, or divide to change the size.

/removeborder does exactly as it says, removes the border.

Anyone can query the size by using /querybordersize, telling them the size in blocks.

Finally, rules for how the border works can be set using /worldborder:gamerules. A list of gamerules can be found in the next section. If you only specify a gamerule, it will return what it's currently set to.

Gamerules

Make sure to use quotation marks when setting numbered gamerules

particleViewRange: 10 -- How close players have to be to see the particles
particleSpread: 10 -- How far away the particles will show from the players, reccomended to keep this the same as particleViewRange
ticksBetweenParticles: 5 -- How many ticks to wait before spawning the particles again, I would keep this to 5
outsideDamageAmount: 1 -- How much to damage players who leave the border. This will be applied every half second
outsideBlocksInteractable: true -- Allow players to interact with outside blocks. This includes things like opening/closing doors and chests. Disabling this will display an error anytime a player tries to interact with a block, even those which aren't interactable. 
outsideBlocksDestructable: true -- Allow players to break outside blocks, for my addon I keep this on, but if you want a true border turn this off.
blocksPlaceableOutside: false -- Allow players to place blocks outside of the border, I reccomend keeping this off.
projectilesBounceOff: true -- Whether or not player projectiles will "bounce" off the border wall, turning this off will just send the projectile through the border. No error is displayed when this happens.
allowCrossing: false -- When set to true, allow players to cross the border without teleporting. Will still damage them.

 

The World Border Team

profile avatar
  • 4
    Followers
  • 4
    Projects
  • 9.5K
    Downloads

More from AngrySalt