How to prevent mob despawning on death/teleportation? Sponge bug or expected behavior?


Spongevanilla 1.12.1 server (beta-322), but I’ve seen this behavior for sooooo long I can’t even remember how many Versions of MC back it has been. I never even stopped to think if it was the way the game worked or not anymore, and a player had noticed a disrepancy between playing with her sibling vs playing on her own and dying in battle (difference = chunks unloading or not)

If I am several hundred blocks away from spawn, and die as the result of a horde of mobs attacking me, if I die , respawn and immediately go /back (ie, nucleus plugin) all the mobs in the surrounding area are gone.

To eliminate the plugin factor, I stripped it right down to a naked spongevanilla server with a command block for teleporting to a fixed location about 400 blocks away from the spawn location, put a few mobs inside of a sun-sheltered box, killed myself, then pushed the button within 1-2 seconds to teleport back, and the mobs are gone. Not invisible, they do not reappear after logging out and in - they are gone.

That mechanism does not happen in the same map, same setup, when I launch just the minecraft 1.12.1 server jar , only the spongevanilla.

I suspect it has something to do with the optimization settings for sponge to cut down on entity management, but don’t believe that destroying all mobs in an unloaded region RIGHT AWAY is the intention especially when there are options that specify soft-and-hard despawn ranges and such.

IS THIS INDEED THE EXPECTED RESULT for sponge to impose on the server, as a result of its under the hood optimizations? Or is this a setting gone wild, or being ignored? Note that I am either hitting a teleportation command block within 0.5 to 2 seconds of respawning, or simply teleporting from one location to another, or teleporting away from mobs to a test location, then back to the mobs again right away within 1-2 seconds I am not twiddling my thumbs for a minute before heading back!!!

Entity section of global.conf:

entity {
        # Number of colliding entities in one spot before logging a warning. Set to 0 to disable
        # Number of entities in one dimension before logging a warning. Set to 0 to disable
        # Number of ticks before a painting is respawned on clients when their art is changed
        # Number of ticks before the fake player entry of a human is removed from the tab list (range of 0 to 100 ticks).
        # Controls the time in ticks for when an item despawns.
        # The upper bounded range where living entities farther from a player will likely despawn
        # The amount of seconds before a living entity between the soft and hard despawn ranges from a player to be considered for despawning
        # The lower bounded range where living entities near a player may potentially despawn
        # Max size of an entity's bounding box before removing it. Set to 0 to disable
        # Square of the max speed of an entity before removing it. Set to 0 to disable

My entire global.conf file is located here:

I had deleted the /worlds folder entirely before starting testing, and did not alter any of the conf files for the dimensions.
Note as well my testing was limited to teleportation within the overworld main world only too, not across dimensions.

Hopefully someone like @blood etc can provide some insight here?


The first thing I suggest to test is to disable some optional modules in the config
try with
This’ll help to narrow down where the issue is coming from.