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.

  • There's no such thing as world border. What you coud have is some coordinates specified by you. Other then that, i don't have the knowledge to help you Jun 24 '15 at 18:49
  • @AndréAlmeida There is such thing as the world border, try the /worldborder command.
    – SirBenet
    Jun 24 '15 at 22:33
  • @colorfusion That worldborder is customizable, so it can't be used as the OP wanted (as far as i understood), to be a objective to be reached by a player since it's a border, wall, whatever. And again, as i said, you can have some coordinates specified by you to make that worldborder, but normal minecraft is infinitable expendable, so no worldborder. Jun 24 '15 at 22:40
  • The default world border isn't infinite and there's not "no such thing as a world border". The default worldborder is 60 million blocks wide/long. I imagine what OP wants to do is get the coordinates of either the corners or center of a previously set world border into a scoreboard objective, although they haven't made it clear.
    – SirBenet
    Jun 24 '15 at 22:50
  • @AndréAlmeida You are wrong. This is actually quite easy, if you know what you're doing.
    – MBraedley
    Jun 25 '15 at 1:03

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.

  • Not extactly the anwser. I already knew this but i don't want the size of the worldborder, but the cordinates for example, a player is in x:100 and z:100 the border size will be 200 because 100+100=200. I want the size to be 100 if the player is in those coordinates. Jun 25 '15 at 16:17
  • Okay, now I have no idea what it is you're trying to do. Do you want the centre of the world border? Do you want to set the size of the world border based on a player's coordinates? You're not making much sense here.
    – MBraedley
    Jun 25 '15 at 16:25
  • For example if the player is in coordinates x:100 and z:100 and the center of the worldborder is x:0 and z:0 and the size 100 the player's coordinates are x:50 and z:50 (in the corner) and in the sidebar it shows that the worldborder size is 100, i want it to show the half of the border size. Jun 25 '15 at 16:40
  • Okay, you need to find a way to explain it to a five year old and then edit your question, because I still don't quite understand what you want to do.
    – MBraedley
    Jun 25 '15 at 18:18
  • Sorry but i'm not english... Jun 25 '15 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.