World border

The world border is the edge of the current Minecraft World. The default center is at 0,0 , with a width and length of 60 million (60000000) blocks. However, with commands, it can be modified to become smaller, have its center shifted, and more.

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

Effects
In creative mode, there is no suffocation damage; the player can stay on the outside and move freely, but cannot place/destroy blocks.
 * Mobs and players cannot move outside the world border.
 * Shot arrows, thrown snowballs, thrown eggs, and thrown ender pearls can still pass through the border, but item entities, fishing rod lines, and particles cannot.
 * If an ender pearl is thrown to an area outside of the border, the player is teleported outside the border.
 * The /tp command works as well.
 * Light is not affected by the world border.
 * Players cannot place and destroy blocks and interact with objects outside the world border.
 * Players can place blocks outside the world border by placing the block against a torch that is inside the world border.
 * If a dispenser or dropper is placed so its "face" is right up against the edge of the border, items, projectiles, TNT, etc. can be fired from the dispenser/dropper outside of the edge of the border. Because of this, it's possible to create a TNT cannon that fires TNT onto an area beyond the border.
 * Falling sand and gravel will become item entities.
 * Explosions work normally outside of the border and can alter terrain as they normally do.
 * Water and lava can flow out of the border, even if the source block is inside it.
 * Buckets appear to work outside of the border. However, this appears to be a client side glitch, as the water and lava placed outside of the border by a bucket will not automatically update, and will disappear upon reloading the world.
 * Dismounting anything at the north or west edge of the border, can cause players to get to the other side.
 * Pistons and hoppers do not work outside the world border, while most other redstone devices, including command blocks and dispensers, will continue to work.
 * Blocks may only be placed and removed by using the command.

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).
 * 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).


 * 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.
 * 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.


 * 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.
 * 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.


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

History
See World boundary for all the different effects of the world boundary prior to the introduction of the world border.

Trivia

 * The effect of the world border is always in full block increments, even if it looks like it is between blocks.
 * Even though the lines don't show above y=256, the border is still effective; the same happens under the bedrock layer (y<1).
 * With the command to change the border over time, the border will still grow or shrink even if the game is paused. The animation also happens even if the game is paused.
 * In the Nether and the End, the world border's dimensions are the same as the Overworld's.
 * The "shimmery" texture was made by Ryan Holtz.
 * The reason the world border is at X/Z ±29,999,984 is that Dinnerbone put it 1 chunk short of that edge to prevent falling through the world.