How to Fix Ticking Entity Crash in Minecraft
Fix 'Ticking entity' crash errors in Minecraft servers and clients. Covers corrupt entities, entity removal, NBT repair, and prevention for Java Edition 1.21+.
How to Fix Ticking Entity Crash in Minecraft
The Error
---- Minecraft Crash Report ----
Description: Ticking entity
java.lang.NullPointerException: Ticking entity
at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:...)
at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:...)
Entity being ticked: Zombie['Zombie'/12345, l='ServerLevel[world]', x=100.50, y=64.00, z=-200.50]
A "Ticking entity" crash occurs when the server or client tries to process an entity's tick logic and encounters an unrecoverable error. The crash report identifies the specific entity and its location, which is essential for the fix.
Quick Fix
Use the coordinates from the crash report to locate the problematic entity. On a server, use an NBT editor (like NBTExplorer) to open the relevant region file and delete the corrupt entity. Alternatively, use /kill @e[type=zombie,x=100,y=64,z=-200,distance=..5] if you can load the world briefly before it crashes.
Step-by-Step Diagnosis
- Read the crash report. Find the "Entity being ticked" line. It tells you the entity type, its unique ID, the world it is in, and its exact XYZ coordinates.
- Calculate the chunk coordinates. Divide the X and Z by 16 and round down. For x=100, z=-200: chunk (6, -13). Calculate the region file: divide chunk coords by 32. Region file:
r.0.-1.mca. - Open the region file in NBTExplorer. Navigate to the chunk, then to the Entities list. Find the entity matching the coordinates and unique ID from the crash report.
- Delete the corrupt entity. Right-click the entity compound tag in NBTExplorer and delete it. Save the file.
- Start the server. If it boots without crashing, the fix worked. If it crashes with a different entity, repeat the process.
- Alternative: kill command. If you can load the world for a few seconds before the crash, join quickly and run
/kill @e[type=!player]in the affected area. You can also try setting the server'smax-tick-timeto -1 temporarily so it does not crash from the watchdog, giving you time to run the kill command.
Common Causes
- Corrupt entity NBT data. A server crash during a save operation can write incomplete NBT data for entities. The entity loads with missing fields, and the tick method throws an exception when it tries to access them.
- Modded entity bugs. Mods that add custom entities sometimes have tick logic bugs that only manifest under specific conditions (like an entity holding an item that no longer exists in the game registry).
- Entity riding another entity. If a passenger entity or its vehicle has corrupt data, the tick logic for the riding relationship crashes. The crash report will mention both entities.
- Armor stand with invalid equipment. Armor stands holding items from removed mods crash when the server tries to tick their equipment slots. Remove the armor stand or clear its equipment using NBTExplorer.
- Recursive entity processing. In rare cases, circular entity references (entity A rides entity B which rides entity A) cause a stack overflow during ticking, reported as a ticking entity crash.
Using Paper's Entity Fix Features
Paper includes built-in protections against ticking entity crashes. In paper-global.yml, the remove-corrupt-tile-entities option automatically removes block entities with invalid data. For regular entities, Paper logs warnings instead of crashing in some cases. Switching from Spigot to Paper can prevent many ticking entity crashes entirely.
Prevention
- Use Paper or Purpur instead of Spigot for better entity handling.
- Keep regular world backups so you can restore instead of manually editing NBT data.
- Avoid using the
/killcommand on large numbers of entities at once, as the sudden removal can cause a save spike. - When removing mods, use a mod that cleans up registered entities before uninstalling.
FAQ
Can I fix this without an NBT editor?
Yes. Set max-tick-time=-1 in server.properties, start the server, and quickly run /kill @e[type=!player] in the affected area. Then set max-tick-time back to the default (60000).
Why does the crash happen in the same spot every time?
Because the corrupt entity is saved in the world data. Every time the server loads that chunk, it loads the corrupt entity and crashes. The entity persists until you delete it or destroy the chunk.
Will deleting the entity break anything else?
Deleting a single mob or item entity has no side effects. Deleting a custom entity from a mod might cause the mod to throw errors if it expects the entity to exist. Check the mod's documentation.
Can chunk corruption cause ticking entity crashes?
Yes. If the chunk data itself is corrupt, entities within it may have invalid data. Use MCA Selector to delete and regenerate the affected chunk as a last resort.
Need a server that handles all this? Astroworld Hosting, NVMe SSDs, Pterodactyl panel, DDoS protection on every plan.