Worldborder coordinates into scoreboard objective

Worldborder coordinates into scoreboard objective - Black and White Dartboard

How can I have the worldborder coordinates into some scoreboard objectives? If it's not possible in vanilla it's not a problem to use a plugin.



Best Answer

The solution is quite similar to this answer I gave a while ago, but of course with some slight changes.

First things first, you need a 20Hz fill clock. How to make one isn't exactly within the scope of this question.

Next, you'll need a scoreboard objective to hold the current world border size:

/scoreboard objectives add BorderQuery dummy

You'll also need an empty player that will keep track of day time:

/scoreboard players set #BorderPlayer BorderQuery 0

The first command block to be triggered by the fill clock should query the border size from the game:

worldborder get

We need to redirect the result of command block to the scoreboard objective we set up earlier. Turn off the fill clock, stand directly on the command block, and enter this command:

/stats block ~ ~-1 ~ set QueryResult #BorderPlayer BorderQuery

The fake #BorderPlayer now stores the world border size in his BorderQuery objective. From there, you can test the objective, and with some more work, perform an operation on it.

If you need to do operations with the objective, it may be better to set the objective for @a (instead of just #BorderPlayer) in the stats command. Additionally, everyone will need the objective active.




Pictures about "Worldborder coordinates into scoreboard objective"

Worldborder coordinates into scoreboard objective - Goal Lettering Text on Black Background
Worldborder coordinates into scoreboard objective - Competitive Pricing Handwritten Text Encircled on Paper
Worldborder coordinates into scoreboard objective - Grayscale Photography of Woman Holding Camera



How do you add a scoreboard to an objective?

Scoreboard Command
  • To add an objective: /scoreboard objectives add <objective> <criteria> [displayName]
  • To remove an objective: /scoreboard objectives remove <objective>
  • To list all objectives: /scoreboard objectives list.
  • To set how the objectives are displayed: /scoreboard objectives setdisplay <slot> [objective]


  • How do you teleport to a scoreboard in Minecraft?

    Setting Up A World Border
  • Specify the center of your world border by using the command /worldborder center <X> <Z> , replacing <X> and <Z> with your X and Z coordinates. ...
  • Once the center is set, you can now specify the size of the world border using the command /worldborder set <size> .




  • Minecraft 1.12 - Getting the Coordinates of an Entity into Scoreboard Objectives




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Engin Akyurt, Anna Tarazevich, Pixabay, Pixabay