World boundary



The world boundary is the area at the edge of the Minecraft world.

Definition
The boundary of the world has several "layers".

The first layer is the world border, which lies at X/Z ±29,999,984 by default, and establishes an arbitrary blockade to prevent the player from advancing. There are several methods of bypassing this border.

The second layer lies exactly one chunk further, at X/Z ±30,000,000. At this point, there is an invisible wall preventing the player from advancing, even in spectator mode. Using commands such as will not work, since the game will not accept any value beyond ±30,000,000. However, by using a minecart (in a superflat preset with the top layer as rails), the player can go even further, up to ±X/Z 30,000,496. However, at that point, the player is frozen in place until the minecart is destroyed, then the player will be teleported back to the ±30,000,000 mark.

The third and final layer lies at X/Z ±30,000,496, which can be considered the absolute edge of the Minecraft world, as chunks will no longer generate beyond this point. It is impossible to advance past this point without the use of external modifications, as this value is hard-coded into the source code of the game.

The maximum possible height is 1.797×10308, the limit where mathematics break down in the game's code. If the player attempts to teleport beyond this limit, the game will read the number as infinity and refuse to teleport.

By editing the source code for the game, it is possible to extend the terrain generation and world border past X/Z: ±30,000,240 (up to X/Z: ±2,147,483,647) and function quite normally (no ghost chunks, mobs can spawn). The game performs normally even at distances of X/Z: ±1,000,000,000, and the commands will accept values beyond the 30 million limit. However, at further distances, block lag starts to become noticeable and mob behavior begins acting very strangely. Attempting to travel or load chunks near X/Z: ±2,147,483,647 will simply cause the game to automatically crash. Thus, it is advised one sets the world border several hundred blocks before this limit.

Effects
Generally, long server response times caused by massive distances will produce unintended results, but most blocks and entities will behave normally, with a few exceptions:


 * Gravity-affected blocks (such as and ), while falling, will jitter in bizarre patterns for several seconds, but will ultimately land on the ground as normal.
 * and will fall normally, albeit at a much slower pace due to long response times.
 * Extended s may sometimes not render until they receive another block update.
 * Flame and smoke particles from certain blocks, like s and s, only appear on the side facing away from the edge.
 * Flame particles will still appear around the entire mob spawner block as a mob is spawning.
 * Beyond the X/Z 30,000,000 mark:
 * Mobs will not spawn at all.
 * Lighting does not update (with exception to sunlight and moonlight).
 * Items may jitter slightly.

Beyond this, most of the unintended behavior of blocks and entities is caused by the world border (as detailed here), rather than the massive distances of the boundary itself.

Cause
Though the reason for the world boundary is still controversial, it may have to do with the way Minecraft generates and loads chunks in the game. When the game's terrain generates it's terrain, it uses something called 3D Perlin Noise. This is a noise map that shows how high or low Minecraft blocks will generate. When the game generates the terrain, it creates a noise map of all the terrain that cannot be interacted with at all. Then, Minecraft would load in the chunks after the basic frame was in place. When the game generates chunks out to X/Z: 30,000,000 then for some reason, the game cannot load chunks beyond this point. However, the terrain noise map has generated the terrain all the way out to X/Z: 2,147,483,647. So Minecraft still generates the terrain noise map, but not the blocks themselves. So what we get is empty terrain that has the textures for the terrain that should be there.

Trivia

 * Traveling from one edge of the world to the opposite edge by powered rail would take 35 days and 10 hours. Building the rails for such a trip would require enough iron and/or gold to fill over  723 double chests, even when packed into blocks, as well as sticks made from enough wood to fill over  135 double chests (as log blocks, not as planks, and excluding the redstone torches). (53 stacks of logs would be required just to make enough chests to hold all the building materials for this rail track.) If already crafted, the rails required would fill  17,361 double chests. If the player had to gather the materials to make all those rails, they would wear out  14,404 diamond pickaxes and  300 diamond axes (on average, about  3,601 diamond pickaxes and  75 diamond axes, both enchanted with Unbreaking 3).
 * Even if one were to amass all these materials, actually laying said track would require the player to travel the entire distance through other means anyway.
 * Factoring in the need for powering the track and assuming the player were to use redstone torches, the player would require 3,529,412 torches for the full track, since a torch can optimally light 17 blocks. That requires 55,148 sticks and bits of redstone dust, which requires 2042 large chests, which requires 128 stacks of log blocks to make the chests (which requires 3 large chests).
 * It is possible to generate trees and vegetation beyond 30,000,000 by loading a version of Minecraft after 1.9, then load a few chunks beyond the world border. Then, close the world and load a version of Minecraft between Beta 1.8 - Release 1.6 and load the same world. If the players travel to the world barrier, there will be a few chunks that will generate beyond 30,000,000 that have trees and grass.
 * It is possible to even generate Far Lands chunks using this method. Load a world in release Beta 1.8 - Release 1.6 and teleport to X/Z: 30,000,000. Close the world before the fake chunks generate and load the world in Beta 1.7.3. The Far Lands chunks will load and then, the player can load as many chunks as they want. Then close the world and load it in a newer version, and the player will have Far Lands chunks in the 30,000,000 block area.

Effects prior to 1.8
世界界限