Skip to main content
← All Guides
Troubleshooting · 9 min read

How to Fix World Corruption in Minecraft

Fix corrupt Minecraft worlds that crash or have missing chunks. Covers region file repair, MCA Selector, backup restoration, and data recovery for 1.21+.

How to Fix World Corruption in Minecraft

The Problem

java.io.IOException: Failed to read chunk data
Region file 'r.0.0.mca' appears truncated
---- Minecraft Crash Report ----
Description: Exception in server tick loop
java.lang.NullPointerException at net.minecraft.world.level.chunk.storage.RegionFile

World corruption occurs when chunk data or region files are damaged. This usually happens during a server crash, power failure, or out-of-memory condition while the server was writing to disk. Symptoms include missing chunks (void holes), invisible blocks, crashes when entering specific areas, and entities disappearing.

Quick Fix

Restore from your most recent backup. If you do not have a backup, use MCA Selector to identify and delete the corrupt chunks. The server regenerates deleted chunks on the next load.

Step-by-Step Diagnosis

  1. Identify the corrupt region. The crash report or log mentions the region file (like r.0.0.mca) or the chunk coordinates. If only coordinates are given, divide X and Z by 512 and round down to get the region file name.
  2. Restore from backup. If you have a backup, stop the server and replace the corrupt region file with the one from the backup. Only replace the affected region file, not the entire world, to minimize data loss.
  3. Use MCA Selector. Download MCA Selector. Open your world folder. The tool highlights chunks with errors. Select corrupt chunks and delete them. The server regenerates the terrain (but player-placed builds in those chunks are lost).
  4. Force-optimize the world. Start the server with --forceUpgrade flag: java -jar server.jar --forceUpgrade nogui. This re-saves all chunks, which can fix some types of data corruption.
  5. Check the level.dat file. If the entire world fails to load, the level.dat file may be corrupt. The server creates level.dat_old as a backup. Delete level.dat and rename level.dat_old to level.dat.
  6. Verify entity data. If specific entities cause crashes, use NBTExplorer to open the region file and remove corrupt entity entries. See our Ticking Entity guide.

Types of World Corruption

  • Chunk corruption: Individual chunks have invalid data. Appears as void holes, missing blocks, or crashes when the chunk loads. Fix by deleting the chunk with MCA Selector.
  • Region file corruption: The entire .mca file is damaged. Multiple chunks in a 32x32 area are affected. Replace from backup or delete the region file.
  • Level.dat corruption: World metadata (spawn point, game rules, seed) is damaged. The world fails to load entirely. Restore level.dat from backup or level.dat_old.
  • Player data corruption: A player's .dat file in world/playerdata/ is damaged. That player crashes when logging in. Delete their dat file (they lose inventory and position).

Common Causes

  • Server crash during save. If the server crashes or is killed while writing chunk data, the partially written file is corrupt. Always shut down servers with the stop command, not kill -9.
  • Out of disk space. If the disk fills up during a save, writes are truncated. Monitor disk usage and keep at least 10% free.
  • Out of memory crash. An OOM crash during world saving corrupts whatever was being written at that moment.
  • Hardware failure. Failing drives, especially HDDs with bad sectors, corrupt data silently. Run smartctl -a /dev/sda to check drive health.
  • Forced shutdown. Pressing Ctrl+C or killing the Java process without stopping the server properly risks corruption.

Prevention

  • Run automated backups every 1-4 hours. Keep at least 7 days of rolling backups.
  • Use an SSD or NVMe drive. They handle interrupted writes better than HDDs.
  • Always shut down with the stop command.
  • Monitor disk space with alerts.
  • Use Paper, which includes safer chunk saving logic than Spigot.

FAQ

Can I recover builds from corrupt chunks?

If you have a backup, restore the specific region file. If not, the data is likely unrecoverable. Deleting the corrupt chunk regenerates vanilla terrain without player builds.

How do I set up automated backups?

Use a plugin like DriveBackupV2, or set up a cron job that runs /save-all followed by a file copy of the world folder. Hosting panels like Pterodactyl have built-in backup schedules.

Is corruption more common on certain server software?

Paper has safer IO handling than Spigot and vanilla. Forge servers with many mods are more prone to corruption because more data is written per save cycle.

Need a server that handles all this? Astroworld Hosting, NVMe SSDs, Pterodactyl panel, DDoS protection on every plan.

Related Tools & Resources

🔧

Minecraft Tools

Calculators, generators & server tools

🧱

Item Database

Browse all Minecraft items, stats & recipes

⚒️

Crafting Recipes

Visual crafting guides for every recipe