6

Recently I build a kind of a zoo in my single player MineCraft world. My goal was to display most (if not all) mobs in the game. Each mob is named using a name tag to prevent despawning and each mob is placed in their own cage (a well lit, 5x5x5 blocks room). After I filled the first few cages with friendly mobs and came back (relogged) some of the cages were empty. Specifically my cow, sheep and pig were missing. Having still plenty of name tags, I rounded up a new cow, sheep and pig, named them and put them in their cage. Some while later (a couple of days, so I logged on again) my cow cage was empty yet again.

I am very sure I've named the mobs that disappeared correctly (I don't know if you even can do it other then correctly). The cages have plenty of room and are well lit and since I've not found the missing mobs roaming around, I highly doubt they have escaped. Since hostile mobs don't attack friendly mobs, I also rule that out as a cause.

Does anyone have an idea on why these mobs disappear? And, if you do, how I can prevent it or fix it?

Note: The world was created in 1.7.1 and is now running in 1.8.10.

  • 1
    There is an issue where loading chunks can cause mobs to glitch inside of blocks, either killing them or pushing them through walls. The happens especially often with non-full blocks like fences. This is somewhat rare, and would require the mob to unload pressed against the wall, so I doubt it's what you're experiencing but that's the only issue that I think would cause "despawning," aside from save corruption. – Silentvenom7 Sep 23 '15 at 21:46
  • I agree this unlikely to be the issue, but I am not rulling glitches like that out at the moment. Is there a way to verify if my save game might be corrupt? – Thorsal Sep 24 '15 at 8:28
  • Just to be sure, I would make your cages out of hollow blocks that mobs cannot suffocate in. If I remember correctly, glass and glowstone work well. – Bob2Chiv Sep 24 '15 at 14:15
  • Probably related – Unionhawk Sep 24 '15 at 18:33
  • The cage sides are made out of iron fences, which are non solid blocks. As mentioned, I do not see the missing animals roaming around, so I'm pretty sure they have not escaped by glitching through the fence. I'm also pretty sure that issue was fixed in 1.7. – Thorsal Sep 25 '15 at 7:20
1

I had this almost exact same problem in my 1.13.2 world, and what worked for me was giving them all different name tags. I don't know why but when I named one sheep "Sheep1" and another "Sheep2" they didn't despawn. I don't know if this will help you as I am in a different version, but if worst comes to worst you can attach them to a fence using a lead. That also fixed my problem.

0

Monsters (not holding items or wearing armor) and squid (but not animals), including hostile wolves as of 1.1, can cease to exist, or "despawn", under certain conditions:

A mob that has had no player within 32 blocks of it for more than 30 seconds has a 1 in 800 chance of despawning on each game tick (1/20th of a second). Therefore, the half-life of monsters not within 32 blocks of a player is 27.73 seconds (after the initial 30 seconds have elapsed).

A mob will immediately despawn if there is no player within 128 blocks of it. Note that this is a Euclidean sphere, not a cylinder from map top to bottom and not a taxicab sphere (which is more like an octahedron). Example: A mob at 0/y/0 will remain at least 30 seconds (as above) if the player moves to 65/y/65 (real distance 91.9), but despawns immediately if the player moves to 91/y/91 (real distance 128.7).

All hostile mobs (including those that are holding items) in a world will despawn if the difficulty is set to peaceful, regardless as to where the player is positioned in the world.

In multiplayer, despawning does not occur while there are no players in the game.

A monster which has been named with a name tag will despawn if players log out more than 100 blocks from them. However, one created from a renamed spawn egg will despawn as normal.

If a monster is holding any items or wearing any armor that was given by a player or picked up from the ground, it will not despawn.

So, I recommend Spawning your mobs in with command blocks, and giving them Items (the items will not be visible.)

  • Thanks for your extended answer, but the problem I have is with named friendly/ passive mobs. I'm not sure if the statement about the named hostile mobs despawning still holds true. I've a named zombie a 'guard' for more since I started the world and have definitively logged out more then 100 blocks away more then once. Since I play vanila ssp, using commands (even through command blocks) is not a path I want to use. – Thorsal Oct 5 '15 at 8:45
0

Ok. this maybe isn't the best method to stop this happening, but usually mobs despawn when the chunk is unloaded. I thought this stopped if the mob was named, but this is worth a try. Place a hopper down. Place another hopper facing the first one, then destroy the first hopper. Then place the hopper back, facing the other one like this: Hoppers in line

Then, place an item in one of them and it will loop around them both, This should keep the chunk loaded even offline as far as I am aware. Like I say it might not work but it is worth a try.

0

I found that in order to stop mobs from disappearing, (pigs, cow, sheep, chickens, etc) you have to attach them to a leash, then attach the leash to a fence pole. No problems so far.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.