How to Fix Chunk Corruption in Minecraft
Fix corrupt chunks in Minecraft: void holes, invisible blocks, and crashes on chunk load. Covers MCA Selector, region file editing, and chunk regeneration.
How to Fix Chunk Corruption in Minecraft
The Problem
Chunks appear as void/missing in specific areas
Players fall through invisible ground
Server crashes when loading specific chunk at x=128, z=-256
java.io.IOException: Failed to read chunk [8, -16]
Chunk corruption is a specific type of world corruption where individual 16x16 block columns have invalid data. The chunk either fails to load (causing a crash or void) or loads with missing or incorrect blocks. Unlike full world corruption, chunk corruption is usually limited to a small area and fixable without restoring the entire world.
Quick Fix
Calculate the chunk coordinates (divide block X and Z by 16), open the world with MCA Selector, select the corrupt chunk, and delete it. The server regenerates the terrain (but player builds in that chunk are lost).
Step-by-Step Fix
- Find the corrupt chunk's coordinates. From the crash report, note the block coordinates. Divide X and Z by 16 and round down to get chunk coordinates. Example: block (128, -256) is chunk (8, -16).
- Calculate the region file. Divide chunk coordinates by 32 and round down. Chunk (8, -16) is in region (0, -1), which is file
r.0.-1.mcainworld/region/. - Stop the server. Never edit world files while the server is running.
- Backup the region file. Copy
r.0.-1.mcato a backup location before making changes. - Option A: Delete with MCA Selector. Open the world in MCA Selector. Navigate to the corrupt chunk. Select it and press Delete. Save. The chunk is regenerated on the next server start.
- Option B: Replace from backup. If you have a backup, copy the region file from the backup. Only replace the specific region file, not the whole world.
- Option C: Use NBTExplorer. Open the region file in NBTExplorer. Navigate to the chunk by its position. If the chunk data is readable but contains invalid entries, you can manually fix NBT tags. If it is unreadable, delete the chunk entry.
- Start the server. The server detects the missing chunk and regenerates it with fresh terrain.
Identifying Corrupt Chunks Without Coordinates
If the crash report does not include coordinates:
- Check
logs/latest.logfor lines mentioning chunk loading errors. The coordinates are usually included. - If players report void holes, ask them for F3 coordinates at the edge of the hole.
- Use MCA Selector's "Filter Chunks" feature to scan for chunks with errors.
- Open the world in single-player creative mode and fly to the reported area.
Common Causes
- Server crash during chunk saving. A crash or kill -9 while the server writes chunk data leaves partial writes.
- Disk full during save. If the disk runs out of space mid-write, the region file is truncated.
- RAM error during chunk processing. A hardware RAM defect can flip bits in chunk data, causing silent corruption.
- Mod or plugin bugs. Mods that modify chunk data during saving can introduce invalid NBT structures.
FAQ
Will deleting a corrupt chunk delete player builds?
Yes. Deleting a chunk removes all blocks, entities, and tile entities in that 16x16 area. The server replaces it with freshly generated terrain. This is why backups are critical.
Can chunk corruption spread?
No. Each chunk is stored independently within the region file. A corrupt chunk does not affect neighboring chunks. However, the same event (like a crash) can corrupt multiple chunks simultaneously.
How do I prevent chunk corruption?
Use the stop command to shut down the server. Monitor disk space. Run on an SSD. Keep regular backups. Use Paper's improved chunk saving. Use ECC RAM on dedicated servers to prevent bit-flip corruption.
Region File Structure
Understanding how region files work helps with diagnosis. Each .mca region file contains up to 1024 chunks (32x32). The file has a header that stores the offset and size of each chunk's data within the file. If the header is corrupt, the entire region file may become unreadable even if individual chunk data is intact. MCA Selector can sometimes repair a damaged header by scanning the file for valid chunk data segments.
Chunks are compressed using zlib (default) or LZ4 (configurable in newer versions). Corrupted compressed data cannot be decompressed, resulting in an IOException during chunk loading. There is no way to repair compressed data that has been partially overwritten or truncated.
Using MCA Selector Filters
MCA Selector supports filter queries to find problematic chunks across the entire world. Useful filters include:
DataVersion < 3700- Find chunks that have not been upgraded to the latest data version.InhabitedTime = 0- Find chunks that were generated but never visited by a player (safe to delete and regenerate).Entities > 200- Find chunks with excessive entity counts that might cause lag.LastUpdate = 0- Find chunks with suspicious metadata that may indicate corruption.
Need a server that handles all this? Astroworld Hosting, NVMe SSDs, Pterodactyl panel, DDoS protection on every plan.