World border

The world border is the current edge of a Minecraft world.

Appearance
The world border appears as animated, diagonal, narrow stripes. When the border is not moving, the stripes are a translucent aqua color. If the border is expanding, the stripes appear green; if the border is contracting, the lines appear red.

Size
The world border is essentially a giant bounding box; by default, its center lies at coordinates x:0, z:0 , with a width and length of 60 million (60000000) blocks from both ends. Its effects cease at an altitude of approximately Y=±1E33 (1 decillion), even though it no longer physically displays below Y=1 and above Y=256. With commands, the size and position of the border can be modified. The world border always behaves in full block increments, even if it is set to a partial block. Its default size and location remain the same across all three dimensions,

Effects
Most entities, with exception to some projectiles, are unable to move through the world border. Any mobs on the outside of the world border will begin to take damage, with exception to players in Creative mode.

While players themselves cannot move through the world border, they can reach the other side of the world border through other means, including:
 * Letting the world border pass them as it is shrinking
 * Throwing an ender pearl through the world border
 * Mounting a minecart, boat, horse, or pig
 * Dismounting anything at the north or west edge of the border
 * Using commands such as.
 * Sleeping next to the world border

Players cannot normally place and destroy blocks (other than lily pads ), nor interact with objects outside of the world border. It is possible to place blocks outside of the world border, either by placing the block against one that is inside the world border, or by using commands. If a dispenser or dropper is placed so that it directly faces the edge of the border, then items, projectiles, TNT, etc. can be fired outside of the edge of the border. If a mob is spawned from a dispenser via a spawn egg, the mob will be killed as normal, but it cannot move and is not affected by gravity. The same applies for dispensed items - they will float in midair; if an item is dropped from the player inventory, the item will fall normally.

Most blocks still function outside the world border, and most redstone contraptions will still function as well. Exceptions include falling blocks (such as sand and gravel), which will drop as an item, and pistons or hoppers, which will simply not function. Explosions also work normally, destroying terrain outside of the border. Light outside of the border remains unaffected.



Liquids can flow through the border and will continue flowing until they reach their flow limit. Liquids can also be placed on the outside of the border, but if so, they do not flow. Liquids placed via a dispenser will flow as normal. Through a dispenser, placing water and then lava, or vice versa, will result in the flow abruptly ending, presumably because the obsidian that would normally generate does not.

Commands

 * Set
 * Sets the border to a square region with the specified size in blocks as the width and length. Optionally, a timeInSeconds may be specified such that the border grows or shrinks from the previous width to that being set over the specified time in seconds. If timeInSeconds is not specified, the world border changes immediately. To reset the world border size, set sizeInBlocks to 60000000 (sixty million). The border will still grow or shrink and the animation will display even if the game is paused.
 * Sets the border to a square region with the specified size in blocks as the width and length. Optionally, a timeInSeconds may be specified such that the border grows or shrinks from the previous width to that being set over the specified time in seconds. If timeInSeconds is not specified, the world border changes immediately. To reset the world border size, set sizeInBlocks to 60000000 (sixty million). The border will still grow or shrink and the animation will display even if the game is paused.


 * Center
 * Sets the center of the area inside the world border to the specified  and  coordinates. Tilde (~) can be used as a relative coordinate. To reset the world border center, set both  and  to 0 (zero).
 * Sets the center of the area inside the world border to the specified  and  coordinates. Tilde (~) can be used as a relative coordinate. To reset the world border center, set both  and  to 0 (zero).


 * Add
 * Adds or subtracts sizeInBlocks to/from the current world border width and length. sizeInBlocks may be a positive or negative number. Optionally, a timeInSeconds may be specified such that the border grows or shrinks from the current width to that being set over the specified time in seconds.
 * Adds or subtracts sizeInBlocks to/from the current world border width and length. sizeInBlocks may be a positive or negative number. Optionally, a timeInSeconds may be specified such that the border grows or shrinks from the current width to that being set over the specified time in seconds.


 * Damage
 * Sets the amount of blocks a player may safely be outside the world border before taking damage. The default is 5 blocks.
 * Sets the amount of blocks a player may safely be outside the world border before taking damage. The default is 5 blocks.


 * Sets the amount of damage a player takes when outside the world border plus the world border buffer. The default is 0.2 damage per second per block.
 * Sets the amount of damage a player takes when outside the world border plus the world border buffer. The default is 0.2 damage per second per block.


 * Warning
 * Causes the screen to be tinted red when a contracting world border will reach the player within the specified time. The default is 15 seconds. The tint will not display if the user is using fast graphics.
 * Causes the screen to be tinted red when a contracting world border will reach the player within the specified time. The default is 15 seconds. The tint will not display if the user is using fast graphics.


 * Causes the screen to be tinted red when the player is within the specified number of blocks from the world border. The default is 5 blocks. The tint will not display if the user is using fast graphics.
 * Causes the screen to be tinted red when the player is within the specified number of blocks from the world border. The default is 5 blocks. The tint will not display if the user is using fast graphics.


 * Get
 * Returns the current width of the world border.
 * Returns the current width of the world border.

History
See world boundary for the effects of the world's edge prior to the introduction of the world border.

Trivia

 * The reason the world border is at X/Z ±29,999,984 is that Dinnerbone put it 1 chunk (16 blocks) short of the edge to prevent falling through the world.