# Chunks

Information regarding minecraft bedrock edition's chunk system.

# View Chunks

# Spawn Chunks

Against popular belief spawn chunks DO exist on bedrock edition. These chunks around a given player's spawn point and are there mostly for performance reasons. If you have ever went into a portal and came back you will know that the transfer from nether to overworld is much faster than the opposite. This is because of spawn chunks. This can help you load those chunks to the ticking status much quicker than if they were fully unprocessed. These chunks form a rounded 11x11 square of <span style="color: rgb(230, 126, 35);">[unloaded chunks](https://bedrockwiki.com/books/chunks/page/view-chunks)</span> and of course bordering them is a rounded 15x15 square of <span style="color: rgb(230, 126, 35);">[locked chunks](https://bedrockwiki.com/books/chunks/page/locked-chunks)</span>.

## <span style="color: rgb(230, 126, 35);">Where do they come from?</span>

<span style="color: rgb(149, 165, 166);">Spawn chunks are a consequence of </span>

```c++
void Player::updateSpawnChunkView();
```

<span style="color: rgb(149, 165, 166);">which is called by these functions to move the spawn chunk view region to where you last set your spawn.</span>

```c++
void Player::setBedRespawnPosition(BlockPos const& bedPosition);
void Player::setRespawnPosition(BlockPos const& inRespawnPosition, DimensionType dimension);
bool Player::setSpawnBlockRespawnPosition(BlockPos const& spawnBlockPosition, DimensionType dimension);
```

[![spawnchunksvisualisation.png](https://bedrockwiki.com/uploads/images/gallery/2025-09/scaled-1680-/spawnchunksvisualisation.png)](https://bedrockwiki.com/uploads/images/gallery/2025-09/spawnchunksvisualisation.png)

<span style="color: rgb(126, 140, 141);">(Visualization by @kiwixite on discord)</span>

<p class="callout info"><span style="color: rgb(126, 140, 141);">These chunks will become unprocessed on server/world shutdown until loaded again. After which they will stay persistent across *that* session.</span></p>

# Locked Chunks

<span style="color: rgb(149, 165, 166);">Locked chunks are chunks that exist and have references in memory but do not process any events. These chunks may behave like unprocessed chunks to the untrained eye, but if you put an entity in one and use **/testfor** you will see that it does still exist. These chunks are generally out of the way in terms of where they appear, so you aren't likely to interact with them in day to day gameplay. Locked chunks are only seen in one natural instance and that is bordering <span style="color: rgb(230, 126, 35);">[unloaded chunks](https://bedrockwiki.com/books/chunks/page/view-chunks)</span></span>.

## <span style="color: rgb(230, 126, 35);">Where are they</span>

<span style="color: rgb(149, 165, 166);">As stated previously they appear around unloaded chunks, but in what way? Locked chunks create a 5x5 square around a given unloaded chunk. This is good to know when testing with unloaded chunks, because these chunks may cause unexpected behavior when you are building. </span>

![lockedchunks.png](https://bedrockwiki.com/uploads/images/gallery/2026-07/scaled-1680-/lockedchunks.png)

<span style="color: rgb(126, 140, 141);">(Green is the [Unloaded chunk](https://bedrockwiki.com/books/chunks/page/view-chunks) and the yellow/orange is locked)</span>

# View Chunks

<span style="color: rgb(149, 165, 166);">View Chunks or Cached Chunks (but officially called view chunks) are chunks that have most but not all functionality disabled within them. These chunks are not simulated and cannot process things like block updates and pending ticks. These chunks do process some events however and knowing what does and does not work will help you be able to interact with these chunks in much more confidence.</span>

## <span style="color: rgb(230, 126, 35);">Where do they come from</span>

<span style="color: rgb(149, 165, 166);">They come from only these sources:</span>

- <span style="color: rgb(45, 194, 107);">End Gateway Pairing</span>
- <span style="color: rgb(241, 196, 15);"> Player Render Distance</span>
- <span style="color: rgb(241, 196, 15);">Spawn Chunks</span>
- <span style="color: rgb(186, 55, 42);">Maps</span>
- <span style="color: rgb(45, 194, 107);">Various Commands</span>
    - <span style="color: rgb(8, 103, 31);">/teleport</span>
    - <span style="color: rgb(8, 103, 31);">/execute detect</span>
    - <span style="color: rgb(8, 103, 31);">/structure</span>
    - <span style="color: rgb(8, 103, 31);">/spreadplayers</span>
    - <span style="color: rgb(8, 103, 31);">/setblock</span>
    - <span style="color: rgb(8, 103, 31);">/fillblocks</span>
    - <span style="color: rgb(8, 103, 31);">/clone</span>
    - <span style="color: rgb(8, 103, 31);">/testforblock</span>
    - <span style="color: rgb(8, 103, 31);">/testforblocks</span>
- <span style="color: rgb(45, 194, 107);">Lighting Updates.</span>
- <span style="color: rgb(45, 194, 107);">Ticking Areas</span>

<p class="callout info"><span style="color: rgb(45, 194, 107);">Green</span> means the view region is deconstructed after use. <span style="color: rgb(241, 196, 15);">Yellow</span> means the area is deconstructed after the owner disconnects. <span style="color: rgb(186, 55, 42);">Red</span> means the area is never deconstructed until the world restarts.</p>

## <span style="color: rgb(230, 126, 35);">What Works In Them</span>

<span style="color: rgb(149, 165, 166);">The things we know to work in unloaded chunks:</span>

- <span style="color: rgb(149, 165, 166);">Redstone circuit structure</span>
- <span style="color: rgb(149, 165, 166);">Capacitors (E.g, Redstone Torches, Repeaters, Comparators) </span>
- <span style="color: rgb(149, 165, 166);">Redstone Dust</span>
- <span style="color: rgb(149, 165, 166);">Global Entities (Player Owned Projectiles, Ender Dragon, fireworks, lightning)</span>
- <span style="color: rgb(149, 165, 166);">Block state changes from a wind charge</span>
- <span style="color: rgb(149, 165, 166);">Sculk Spread</span>
- <span style="color: rgb(149, 165, 166);">Block Creation</span>
- <span style="color: rgb(149, 165, 166);">Tripwire</span>
- <span style="color: rgb(149, 165, 166);">Target Block</span>
- <span style="color: rgb(149, 165, 166);">Pressure Plate</span>
- <span style="color: rgb(149, 165, 166);">Damaging/Killing Entities (Non-Global Entities will not be fully dead/deleted until simulated)</span>
- <span style="color: rgb(149, 165, 166);">Artificial Entity Spawning</span>
- <span style="color: rgb(149, 165, 166);">Breeze Projectile Redirection</span>
- <span style="color: rgb(149, 165, 166);">Pending Tick Scheduling (Not execution)</span>
- <span style="color: rgb(149, 165, 166);">Wind Charging effect.</span>
- <span style="color: rgb(149, 165, 166);">Weaving Effect</span>

<p class="callout info"><span style="color: rgb(149, 165, 166);">Although Observers are a "Pulse Capacitor" they cannot fire in unloaded chunks due to their reliance on pending ticks.</span></p>

<p class="callout warning">Since tridents are player-owned projectiles, they can fall through the world if they spawn in an unloaded chunk before the chunk’s block collision map is initialized especially when the world is running slowly. Grindstones are used to combat this.</p>

## <span style="color: rgb(230, 126, 35);">How it works under the hood</span>

<span style="color: rgb(149, 165, 166);">This functionality is a product of </span>

# Invalid Chunks

## <span style="color:rgb(230,126,35);">Invalid Chunks </span>

<span style="color:rgb(149,165,166);">Invalid Chunks are chunks that simply do not exist anymore. These chunks have no references in the game's memory and are stored entirely on disk until they need be accessed again. These chunks fully delete anything that passes through them and save their current NBT state. These are the chunks that you get the "Chunk still loading. You may encounter some mild performance issues." so next time you get that message when teleporting or going too fast you have those chunks to thank. These chunks also process absolutely nothing as you might expect. </span>

## <span style="color:rgb(230,126,35);">Uses</span>

<span style="color:rgb(149,165,166);">The main use for these chunks is falling block duplication. When a falling block turns into a block there is still 3 tick in which the entity still exists. Because an these chunks delete the entity references we can essentially bypass the deletion mechanism allowing us to have both the entity and the block. </span>

<span style="color:rgb(149,165,166);">A more niche use is for NBT state saving. Using these chunks we save the NBT (Named Binary Tag) of an entity just as if it was loaded from a structure block. This allows us to keep certain tags that are useful for example the **minecraft:raid\_configuration** tag. This tag is useful because it is what makes witches throw healing/regeneration potions. This tag saving can be done by simply putting a the entity of choice into a portal. This will destroy the reference normally used to remove those tags when they aren't being used.</span>

<p class="callout info"><span style="color:rgb(149,165,166);">These are represented by -1 in the game code.</span></p>

# Loaded Chunks

### <span style="color:rgb(230,126,35);">Loaded Chunks/Simulated Chunks</span>

<span style="color:rgb(149,165,166);">Loaded Chunks also known as simulated chunks are the chunks that anything can normally process in. These chunks only occur around a player or created with the use of **/tickingarea** or **Add-ons.** These chunks are what players will spend their time interacting with a majority of the time.</span>

<p class="callout info"><span style="color:rgb(149,165,166);">These chunks are represented by the hex code 0x0009 in the game code.</span></p>

### <span style="color:rgb(230,126,35);">Buffer Chunks</span>

Around every loaded chunk is a buffer of <span style="color:rgb(230,126,35);">[unloaded chunks](https://bedrockwiki.com/books/chunks/chapter/view-chunks)</span> this is to improve load times and general stability of the game.

### <span style="color:rgb(230,126,35);">Loaded Area Size</span>

<span style="color:rgb(126,140,141);"><span style="color:rgb(149,165,166);">The size of the area of loaded chunks around a player is dependent on the **simulation distance** setting in the world settings and it comes in four different sizes 4 chunks, 6 chunks, 8 chunks, and 12 chunks. These sizes are not radii as you may be inclined to believe but instead follow <span style="color:rgb(230,126,35);">[taxicab geometry](https://en.wikipedia.org/wiki/Taxicab_geometry)</span>, going from each corner of the central chunk containing the player.</span></span>

[![image.png](https://bedrockwiki.com/uploads/images/gallery/2025-09/scaled-1680-/DCtimage.png)](https://bedrockwiki.com/uploads/images/gallery/2025-09/DCtimage.png)

<span style="color:rgb(126,140,141);">(blue: sim 4, green: sim 6, yellow/orange: sim 8, pink/red: sim 10, purple: sim 12)</span>

### <span style="color:rgb(230,126,35);">Functions</span>

<span style="color:rgb(149,165,166);">Chunks that are loaded/simulated are able to process anything you will find in normal gameplay such as: </span>

- <span style="color:rgb(149,165,166);">Entity AI/Events</span>
- <span style="color:rgb(149,165,166);">block ticking</span>
- <span style="color:rgb(149,165,166);">random ticks</span>
- <span style="color:rgb(149,165,166);">Entity states</span>

<p class="callout info"><span style="color:rgb(53,152,219);">It is important to note that events can happen outside of these loaded chunks. See <span>[unloaded chunks](https://bedrockwiki.com/books/chunks/page/view-chunks) for more </span></span><span style="color:rgb(53,152,219);"><span>information.</span></span></p>

# Slime Chunks

## <span style="color:rgb(230,126,35);">Slime Chunks</span>

<span style="color:rgb(149,165,166);">Slime Chunks are chunks that have the ability to spawn the slime entity when a player is within spawning range. Slime chunks spawn slimes regardless of light level as long as there is a valid place for them to spawn. The game will only spawn slimes in slime chunks at y=40 and below so you don't have to worry about ever seeing them on the surface. Slime chunks are not randomized by seed and their positions can are interchangeable between worlds. If you find a slime chunk in one world you can go to those coordinates in another world and find the same place spawning slimes.</span>

## <span style="color:rgb(230,126,35);">How to find them</span>

<span style="color:rgb(149,165,166);">Slime chunks can be found by four main methods.</span>

- <span style="color:rgb(230,126,35);">[Chunkbase](https://www.chunkbase.com/)</span>
- <span style="color:rgb(230,126,35);">[Resource Pack](https://github.com/RavinMaddHatter/Bedrock-Technical-Resource-Pack)</span>
- <span style="color:rgb(149,165,166);">Trial and Error</span>
- <span style="color:rgb(149,165,166);">Already knowing the locations</span>

<span style="color:rgb(149,165,166);">Depending on your use case and conditions one option may be more suitable than the others.</span>

# Chunks

## <span style="color:rgb(230,126,35);">Chunks, What are they?</span>

<span style="color:rgb(149,165,166);">Chunks are 16x16 partitions of space on a Minecraft world that the game will load individually around a player or based on certain conditions. The reason why this is done is because the game is 30 million blocks by 30 million blocks big and loading all that at once would be take an extremely large amount of computation. There are a few differences in chunks that dictate what they can and cannot do, these differences are very important to memorize if you want to get into technical Minecraft.</span>

## <span style="color:rgb(230,126,35);">Chunk States/Types</span>

<span style="color:rgb(149,165,166);">There is a variety of chunks which do certain things these include:</span>

- <span style="color:rgb(230,126,35);">[Slime Chunks](https://bedrockwiki.com/books/chunks/page/slime-chunks)</span>
- <span style="color:rgb(230,126,35);">[Loaded Chunks](https://bedrockwiki.com/books/chunks/page/loaded-chunks)</span>
- <span style="color:rgb(230,126,35);">[Unloaded Chunks](https://bedrockwiki.com/books/chunks/page/view-chunks)</span>
- <span style="color:rgb(230,126,35);">[Locked Chunks](https://bedrockwiki.com/books/chunks/page/locked-chunks)</span>
- <span style="color:rgb(230,126,35);">[Unprocessed Chunks](https://bedrockwiki.com/books/chunks/page/invalid-chunks)</span>

## <span style="color:rgb(230,126,35);">Subchunks</span>

<span style="color:rgb(149,165,166);">Subchunks are 16x16x16 subdivisions of a given chunk to improve load times and to help prevent the game from loading things that don't need to be. Subchunks divide the parent chunk along the vertical axis and inherits the load state of it. A given Subchunk may determine very small things and is mostly related to client side rendering. The reason why Subchunks exist is to try and avoid storing an entire chunk in a single giant array and prevent unneeded lag for the same reason chunks exist. </span>

## <span style="color:rgb(230,126,35);">Chunk Codes</span>

<span style="color:rgb(230,126,35);"><span style="color:rgb(149,165,166);">Bedrock edition defines a given chunk by an internal assigned code system; these are used to keep track of what chunk state a given chunk is in.</span></span>

<table id="bkmrk-chunk-state-byte-cod" style="border-collapse:collapse;width:39.4048%;"><colgroup><col style="width:59.6942%;"></col><col style="width:40.3058%;"></col></colgroup><tbody><tr><td><span style="color:rgb(255,255,255);">**Chunk State**</span></td><td><span style="color:rgb(236,240,241);">**Byte Code**</span></td></tr><tr><td>Unloaded</td><td>0x0000</td></tr><tr><td>Generating</td><td>0x0001</td></tr><tr><td>Generated</td><td>0x0002</td></tr><tr><td>PostProcessing</td><td>0x0003</td></tr><tr><td>PostProccessed</td><td>0x0004</td></tr><tr><td>CheckForReplacementData</td><td>0x0005</td></tr><tr><td>NeedLighting</td><td>0x0006</td></tr><tr><td>Lighting</td><td>0x0007</td></tr><tr><td>LightingFinished</td><td>0x0008</td></tr><tr><td>Loaded</td><td>0x0009</td></tr><tr><td>Invalid</td><td>-1</td></tr></tbody></table>

## <span style="color:rgb(230,126,35);">World Generation</span>

<span style="color:rgb(149,165,166);">When a chunk is generated for the first time, it looks at the seed and generates terrain deterministically with a pseudo-random algorithm based on it. This terrain can be found again in a new world of the same seed because of it being deterministic. </span>

<span style="color:rgb(149,165,166);">Structures generate based on chunks as well and their position in a chunk it loads is often predictable.</span>

- <span style="color:rgb(149,165,166);">Buried Treasure: Southwest block of the chunk's center four blocks.</span>
- <span style="color:rgb(149,165,166);">Pillager Outpost: Southeast corner of the chunk.</span>
- <span style="color:rgb(149,165,166);">Stronghold Spiral Staircase (Stronghold start structure): Northwest corner of the chunk</span>
- <span style="color:rgb(149,165,166);">Temple: Northeast corner of the chunk.</span>
- <span style="color:rgb(149,165,166);">Ruins: Center of the chunk.</span>
- <span style="color:rgb(149,165,166);">Mineshaft Starter: Northwest corner of the chunk.</span>
- <span style="color:rgb(149,165,166);">Amethyst Geode: Northwest corner of the chunk.</span>
- <span style="color:rgb(149,165,166);">Ruined Portal: Structure loading will start in northwest corner of a chunk but bleed into a random direction.</span>
- <span style="color:rgb(149,165,166);">End Fountain: (0, 64, 0) or Northwest corner of the chunk.</span>
- <span style="color:rgb(149,165,166);">End City: Southeast block of the chunk's center four blocks.</span>
- <span style="color:rgb(149,165,166);">Ocean Monument: Center of the chunk.</span>
- <span style="color:rgb(149,165,166);">Mansion Entrance: Southeast block of the chunk's center four blocks.</span>
- <span style="color:rgb(149,165,166);">Fortress Starting Intersection: Southeast block of the chunk's center four blocks.</span>
- <span style="color:rgb(149,165,166);">Igloo: Structure loading will start in northwest corner of a chunk but bleed into a random direction.</span>
- <span style="color:rgb(149,165,166);">Witch Hut: Northwest corner.</span>

<p class="callout warning"><span style="color:rgb(149,165,166);">Not all structures in Minecraft generate in a perfectly predictable way.</span></p>

## <span style="color:rgb(230,126,35);">Per-Chunk Processing</span>

<span style="color:rgb(149,165,166);">Chunks may process some things separately from each other and knowing about these discrepancies can save you headache*s* when building a machine. Chunks will process all events it can within one chunk before starting on the events in another making it so that each chunk executes at different times. Ticking areas have priority in this and will always be executed before any other chunks allowing you to determine which cross-chunk event will happen first. (E.g, two pistons extending into the same tile) This order is predictable and changes every 20 ticks, so if you know what order the chunks are in for the 1st tick you will also know the order for the next 19 but not anything after. Chunks also have their own independent <span style="color:rgb(230,126,35);">[pending tick](https://bedrockwiki.com/books/tick-system/page/pending-ticks)</span> queue and will only process pending ticks within the borders of its own chunk.</span>