Despawn range of hostile mobs (Slimes) near original spawn

The place to talk about how BTW might be different
Post Reply
Soaplegs
Posts: 7
Joined: Fri Oct 04, 2013 6:54 pm

Despawn range of hostile mobs (Slimes) near original spawn

Post by Soaplegs »

I have observed this in version :dancer::poo::dancer::bee:

I think slimes and possibly other mobs may be filling up the mob cap in my world.
I made a new world after the last update, and original spawn was in a swamp. In the beginning mob spawns were at their normal terrifying level but lately, maybe after 10-15 hours of play, I rarely see any hostile mobs at all. There is an open ravine near spawn, and due to being in a swamp it has filled up with slimes. Each time I go there it looks like the same 20-ish slimes are stuck down there. I suspect that there may be more of these slime pits around. My hidey-hole base is about 80 blocks from original spawn.

It has gotten to the point that it has become safe for me to wander around outside at moonlit nights with no armor and only a bone club as protection. I suspect the slimes have filled my mob cap, and for some reason never seem to despawn even when I leave the area.

Having so few mob spawns is actually bad for me right now, I'm quickly running out of string.
It could of course be random, but it feels like the spawns have been consistently decreasing.

Screenshots of slimes and surroundings: https://imgur.com/a/Exuask4
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Despawn range of hostile mobs (Slimes) near original spa

Post by FlowerChild »

Interesting. I took a look and it appears this is actually a vanilla bug that my recent changes exposed. The despawn timer isn't working at all in slimes, it just wasn't really noticeable before now because they'd despawn anyways when the player was far enough away.

Given that second condition never occurs in the spawn chunks anymore, they just weren't despawning.

Anyways, long story short: fixed for next release.
Sandrew
Posts: 175
Joined: Thu Jan 05, 2012 6:49 am
Location: Netherlands

Re: Despawn range of hostile mobs (Slimes) near original spa

Post by Sandrew »

I don't think this warrants its own post, but spiders too don't seem to despawn when they're targeting prey. As a consequence there is a small population of spiders permanently hanging out at my base, controlled primarily by stray shots from skeletons. Since I doubt that this is an intended outcome I figured it worth mentioning.

This might apply to other mobs, but I haven't tested this.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Despawn range of hostile mobs (Slimes) near original spa

Post by FlowerChild »

I've never understood what resource people are attempting to conserve by reusing threads, and this probably should have been its own topic, but ok :)

I just looked into the bit with the spiders, and it looks like the old vanilla AI (like before they rewrote pathing for most mobs) only ticks mobs with a target for despawn at about 1% of the rate of others. So, they would likely go eventually, but yes, that's exceedingly slow, on average taking in the neighborhood of 2 hours, assuming the player doesn't approach them and restart the despawn process. This wouldn't be as noticeable in vanilla however, given that spiders don't go after chickens, and that there aren't any permanently loaded chunks which would keep them hanging around.

I think spiders and silverfish are the only mobs that still use this old AI, but yeah, I'll fix that up.

Good catch, but please don't recycle threads :)
Post Reply