Home›Java›Mods›Mob Despawn Fix
ModsJava

Mob Despawn Fix

Java mod listed for Minecraft 1.13–26.x. Downloads from the MC Java Mods app on Android.

by derexXD · on Modrinth

Inspired by the Let Me Despawn mod / plugin, this eliminates one of Minecraft's most severe hidden lag sources: hundreds of cave mobs hoarding items…

⬇ Download on Modrinth

If this project helped you, please consider leaving some stars on the Github!

Support me on Ko-fi

Mob Despawn Fix

A modern, high-performance Spigot/Paper server optimization plugin that eliminates subterranean mob-hoarding lag caused by monsters picking up ground items.

Inspired by Let Me Despawn by frikinjay and its earlier Paper fork by contionability. This project is a modern, clean-room Spigot/Paper rewrite designed from the ground up to support modern Minecraft versions (1.13.2 through 1.21+) while keeping worlds completely lag-free.


Description

In vanilla Minecraft, whenever a hostile mob (such as a Zombie, Skeleton, or Drowned) walks over and equips or picks up any dropped item from the ground, vanilla sets PersistenceRequired: 1b

Because of this mechanic, when players spend extended periods of time in an area, dark caves and aquifers beneath their bases gradually accumulate dozens or even hundreds of monsters that scooped up mob drops (rotten flesh, arrows, bones), chicken jockey eggs, or broken gravel.

These monsters:

Mob Despawn Fix dynamically overrides this persistence, allowing mobs that hoard junk items to despawn naturally like ordinary monsters, without putting player equipment, named mobs, or farms at risk.


Features


Commands & Permissions

All commands support the primary /mobdespawnfix command as well as the /mdf and /ddespawn aliases.

Command Description Permission
/mdf info Scans loaded chunks and reports total monsters, persistent mobs, and hoarders. mobdespawnfix.use
/mdf purge Manually purges non-protected persistent hoarders across loaded chunks. mobdespawnfix.use
/mdf reload Reloads config.yml and updates whitelist/blacklist definitions on the fly. mobdespawnfix.use

Configuration

# Mode can be 'whitelist' (only listed items allow despawn) or 'blacklist' (all items allow despawn except listed ones)
mode: whitelist

# Items mobs pick up that will allow them to despawn (used when mode: whitelist)
whitelist:
  - rotten_flesh
  - bone
  - arrow
  - string
  - spider_eye
  - gunpowder
  - slime_ball
  - glow_ink_sac
  - ink_sac
  - ender_pearl
  - egg
  - feather
  - raw_chicken
  - gravel
  - flint
  - dirt
  - cobblestone
  - stone
  - torch
  - redstone_torch
  - coal
  - raw_copper
  - raw_iron
  - kelp
  - seagrass

# Items mobs pick up that will NEVER despawn (used when mode: blacklist)
blacklist:
  - diamond
  - diamond_sword
  - diamond_helmet
  - diamond_chestplate
  - diamond_leggings
  - diamond_boots
  - netherite_ingot
  - netherite_sword
  - netherite_helmet
  - netherite_chestplate
  - netherite_leggings
  - netherite_boots
  - totem_of_undying
  - elytra

# Despawn mobs in vehicles (boats, minecarts, etc.)
despawn-vehicle: false

# Despawn existing mobs that were marked persistent via holding items
retroactive-despawn-check: false

prevent-pickup-persistence: true
ignore-named-mobs: true
ignore-named-items: true

Why was this made?

6 years ago, I made a post on r/Minecraft:

/effect give @e[nbt= {PersistenceRequired:1b}] minecraft:glowing

This returned around 600 targets somehow, and showed a bunch of underground mobs that never despawned either. This is starting to make my world lag and I'm wondering why it's happening.

For years, survival worlds and servers have suffered from this exact mechanic—zombies hoarding chicken eggs, chicken jockey drops, and stray arrows in unlit caves below bases.

While the original Let Me Despawn mod tackled this on Forge/Fabric, the Paper/Spigot plugin version had not received any updates in over 4 years. We created this modern clean-room implementation to solve the problem for modern servers with clean code, safe defaults, and zero bloat.


❤️ Credits

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more