Spawn chunk

Introduction
A Spawn Chunk is a chunk within the area surrounding the world spawn point. These chunks are special in that they will not be unloaded from memory, regardless of how far away a player moves, so long as there is at least one player in the Overworld.

Behavior
Normally only the chunks immediately surrounding a player are loaded into memory. As the player moves through the game world, new chunks that come into range are loaded into memory and older chunks that are out of range are unloaded and saved to the disk. When a chunk is unloaded, all processing in that chunk stops. This means, for instance, that redstone machines and iron golem farms will only work if a player is nearby. This can make effective farming difficult when the player spends a lot of time exploring or in another dimension. Since spawn chunks do not get unloaded, they continue to process events, even when no players are nearby. Be careful when resetting the worldspawn (with the cheat  ). Setting it to a place that gets bad lag (the Far Lands for example, or an area with a ton of redstone clocks) will cause that lag to be present no matter where you are.

Events processed in distant spawn chunks
The following events will occur without interruption in spawn chunks, regardless of player location in the Overworld.


 * Liquids and Fire: Fire, water and lava will spread normally. Lava can start fires on nearby flammable objects.


 * Entities: Dropped items will fall and can be moved by water or destroyed by lava and will despawn after 5 minutes if not picked up by a player or sucked into a hopper.


 * Mechanisms: Minecarts, hoppers, dispensers and redstone mechanisms will all operate normally. Minecarts will travel around and trigger detector and activator rails. Pistons will extend and retract. Additionally, the normal 128 block vertical transmission limitation on redstone signals is ignored in spawn chunks. That is, a redstone signal can be transmitted from bedrock up to the full build height of y=256.


 * Villages: Villages can be created and deleted as villagers move about and doors are broken. Iron golems will spawn and villagers will breed if all other conditions are met.


 * Passive mobs: Baby animals and villagers will grow into adults. Sheep will eat grass and grow wool.


 * Falling blocks: Sand and gravel will fall if the block below is moved or destroyed.


 * TNT: Primed TNT will fall and explode. However, if the explosion reaches into an unloaded chunk, no blocks in the unloaded chunk will be affected. Additionally, if primed TNT is launched into an unloaded chunk, it will freeze and not explode until that chunk is loaded.

Events not processed in distant spawn chunks
Several game events require that a player be within the chunk update range, in addition to having the chunk loaded into memory. (The chunk update range varies with view range and memory settings in single player mode and is admin-configurable on multiplayer servers.) The following events will not occur in a spawn chunk unless the player is within the chunk update range.


 * Plant Growth and Decay: Plants (including crops, mushrooms, sugar cane, cacti, and saplings) do not grow and leaves will not decay unless a player is in range.


 * Hostile Mobs: Hostile mobs will instantly despawn if they spawn more than 128 blocks from any player. This includes zombie pigmen at Nether portals and witches in witch huts. Additionally, hostile mobs will stand still and not move if they are more than 32 blocks from any player.


 * Passive Mob Spawning: Passive mobs will not spawn naturally more than 240 blocks away from a player. However, the friendly mob spawn cap is limited by the number of friendly mobs loaded into memory. This means that any friendly mobs present in the spawn chunks count towards the mob cap and will usually prevent friendly mobs from naturally spawning anywhere else in the world. The only exception is when passive mobs spawn as part of a newly generated chunk.


 * Ice: ice does not form or melt unless the player is within range.


 * Block Spread: Grass and mycelium will not spread unless a player is in range.

Spawn chunks and other dimensions
All Overworld chunks (including the spawn chunks) are unloaded 60 seconds after the last player in the Overworld enters another dimension (the Nether or the End). This means that spawn chunks stop working if the player spends a lot of time away from the Overworld. However, if an item is tossed into a nether portal from the Overworld, this 60 second timer is reset, and the spawn chunks remain loaded and active.

One method of keeping spawn chunks loaded, even when all players are in other dimensions, is to create a redstone mechanism in a spawn chunk that causes a dispenser to throw an item into a nether portal every 45 seconds. Since the 60 second threshold is never reached, the spawn chunks are never unloaded.

Finding spawn chunks
In single player mode, the spawn chunks consist of the 12x12 chunk area centered on the northwest corner of the chunk containing the world spawn point. Several methods exist to locate the spawn point and, by extension, the spawn chunks. The easiest method is to simply use the player command /setworldspawn to set a new spawn point. The 12x12 chunks surrounding the new spawn point will be spawn chunks. A mod or external program such as NBTexplorer or MCEdit can also be used to find and set the world spawn point.

The next easiest method is to build a Compass. Minecraft Compasses point to your worldspawn.

On older versions of Minecraft (before the compass) when commands or external apps are not available, the spawn point can be calculated by observing respawn behavior. Whenever a player dies without being connected to a bed, that player will respawn within 20 blocks of the world spawn. To find the spawn point, the player can die and record the coordinates of the respawn location. After a number of such attempts, the average values of the observed x and z respawn coordinates will give the approximate x and z coordinates of the world spawn. The more attempts that are made, the more accurate the calculation.

A more direct method of finding the spawn point is to use the End portal. When items are thrown through the exit portal in the End, they appear on the northwest corner of the highest block at world spawn coordinates. Additionally, if the player steps through the exit portal in the End without having a bed, the player will appear in the Overworld on the world spawn block.