I am trying to keep "not tamed", but "named" mobs, such as ocelots and wolfs. As far as I understand (also confirmed by Lance) wild named mobs should not despawn. I tryed this twice now with a wolf and with an ocelot. Both despawned eventually. Both have been shut in a room, the wolf with walls several blocks thick. Both did not despawn the first time they have been alone on the res. But when I logged off or been away a bit longer they vanished. /entcount gave a result from 0 entities and 0 animals, when the ocelot disappeared. There for they really vanished. I can do more testing if required, but Id really like to see this working, because I want to make use of this :3.
If you are testing, try this. Keep two in the room. One named and tamed, the other named not tamed. Let them both 'roam' as untamed do not 'sit' and stay in one place. See if this makes any difference. I wonder if it has something to do with the animal being able to run about (as it cannot sit) and perhaps 'glitching' somehow into a wall suffocating it. Still, if someone with more knowledge than me wants to chime in...
I believe the no despawn behavior only applies to tamed mobs, and doesn't care about being named or not.
Though this was somewhat my intention, I am a bit dissappointed about the result. But for now I will do some more testing, about what it is supposed to do ^^
To make sure they are indeed despawning and not dying turn animal damage off, but it seems unlikely they died without evidence more than once. The name tag item in vanilla Minecraft is supposed to prevent any named mob from despawning. I'm not sure if that applies to eggs renamed in the anvil or not.
Animal Dmg was turned off with the wolf. I was trying to set him on fire to see how close it comes to a netherhound so I know it was off. (He burned for minutes so no dmg ^^) The wolf was renamed with a name tag.
XD Want to buy a netherhound? ...but it really shouldn't despawn. That is a bug or something. Really, nothing should despawn in town, right? Don't they just stop spawning at 100/100? It doesn't sound like you were at 100, anyway. You can try limiting it to a 20x20 area, but the name tag should overcome that limitation. Without EMC's special coding, a name tag should prevent any mob from despawning, even a silverfish or a wither.
Go bump my post asking for fire charges in town so you can burn the wolves remotely, and report as a bug.
Aikar from my research I take it named mobs arent supposed to despawn in our current settings. The only thing could be if town server is on peacful. Is that the case maybe?