I saw the despawn issue for the first time this weekend while teaching my children more about minecraft. My daughter dug a 2 deep by 6x6 sand pit and trapped a cow in it. After a couple hours of play, the cow was gone. there was no evidence of any drops, nothing else was in the pit. The game was spiltscreen offline and all other players were accounted for.
Honestly this is the first time I've seen this bug in probably over 50 hours of play since the update. I believe sixstring is definitely on the correct track, the animal despawning issue has to be related more to the mob storage buffer. On my hardcore world, I have left 2 cows and 3 sheep penned while I have been exploring a ravine system on the other side of the map with no ill effects.
The only time I have ever lost an animal in a pen (prior to the note in the first paragraph) was when I accidentally bred my two guard dogs and the resultant puppy immediately went over and ate one of my sheep that was pressed up against the fence. (which shoudl tell 4J something about fence collision mechanics....
I have a hunch that animals are stored in an array that controls the number of animals in any given area.
I think you're probably right. Overall, I think problem has been fourfold. 1. Some people trying to house animals in large pens (I did this myself and they all did despawn when I left the area). 2. Animals respawning on the wrong side of the fence when the game is saved, exited, and then re-entered. (I've witnessed this happen on several occasions 3. Wolves killing sheep through the fences (I've also witnessed this happen.) 4. Animals over the cap being bred or brought into the area (as sixstringstrummer has described).
Note what padware specifically says, "If an animal CANT move more than 20 blocks...." and not "IF an animal moves"
I think people are reading what he said wrong. His statement implies there is some pathing routing that determines whether animal can move 20 blocks in any give direction and base don the result of this pathing sets the despawn flag.
That means, if there is some issue in the fence collision mechanics, it might be possible for the pathing logic to fail and to mark as a "wandering" mob when (to the viewer) it looks like they shouldn't be.
No, but animals don't really behave the same way on the PC as they do on the xbox. If you kill your animals around you you need to goto new chunks to get them. Over a period of time it will generate new ones but it takes much much longer they it does on the xbox. I've got many farms on my PC version with many more animals and never once had any despawn.
I think 4J made some key changes to make people happy and always able to find animals in their surroundings which broke the 'normal' behavior. Animals also seem a bit smarter on the PC version. I've never really found them in caves like i do on the xbox.
However someone above posted a really good idea and that is once an animal has been breed the baby and its parents shouldn't despawn and set to a perm passive.
I used to wonder about the despawning issues, but then one day I watched my mass of 12 sheep in a corner when I was trying to breed them. They successfully pushed one through a solid wall. Same with my chickens. I'll test today and see if the issues fixed.
Rollback Post to RevisionRollBack
Please Sub to the YouTube,
Also, I'm soon going to start 'World 4' view my World 3 via my YouTube. Best Survival Map you will EVER See.
I have 4 pens, one for cows, sheep, pigs and chickens. The sheep have room. The cows and pigs do not. Twice I have been breeding the pigs when all of them just poofed. Kinda hard to run a shop where you sell pork and beef if you cant breed in large numbers.
If an animal can't move more than 20 blocks in any direction, it shouldn't despawn.
This is a correct answer.
HOWEVER, "supposed to" are the key words here. They will despawn even from small pens.
I find that if I spend more time near them. It seems to help if I exit the game near the pens instead of half way across the map.
I had a pen of less than 20x20 with 2 of each animal. I would always breed the parents in order to produce a baby and then kill one of the parents for its food.
I found that when I travelled to the other side of the map for extensive gaming sessions without returning even once to my pens, all the animals would despawn.
Someone suggested that maybe creating a pen with 2 layers of fencing instead of 1 - that way it is not possible for animals to despawn and respawn on the wrong side when the game is saved, exited, and then re-entered.
This is a correct answer.
HOWEVER, "supposed to" are the key words here. They will despawn even from small pens.
I find that if I spend more time near them. It seems to help if I exit the game near the pens instead of half way across the map.
I've learned something new about the animals since I made that post. IF you exit and save and reload your map far away from your animal pens, a bunch of new wild animals will spawn around you and the animal cap may get exceeded. This is because the chunk on which your animal pens are located hasn't been loaded until you walk back to them. If you get back too quickly and the chunk gets loaded while you still have too many animals in the world as a whole, the animals in the pens will despawn as the chunk is loaded. To prevent this from happening, I generally try to kill of some animals while I'm walking back to my base (IF I know I last loaded the world while I was away from my base. The other option is to always try to return to your base before exiting the world. I don't know yet how this might work differently when there is more than one player in the game.
Right. I'm saying 4J should change that and keep animals that have been used for breeding from despawning along the same lines as tamed wolves. This would fix the despawning problem. To keep animals just breed them once.
I've learned something new about the animals since I made that post. IF you exit and save and reload your map far away from your animal pens, a bunch of new wild animals will spawn around you and the animal cap may get exceeded. This is because the chunk on which your animal pens are located hasn't been loaded until you walk back to them. If you get back too quickly and the chunk gets loaded while you still have too many animals in the world as a whole, the animals in the pens will despawn as the chunk is loaded. To prevent this from happening, I generally try to kill of some animals while I'm walking back to my base (IF I know I last loaded the world while I was away from my base. The other option is to always try to return to your base before exiting the world. I don't know yet how this might work differently when there is more than one player in the game.
That might help. I just try to make sure I'm at the compound before I exit the game. It seems to help, but I still lose a few.
That might help. I just try to make sure I'm at the compound before I exit the game. It seems to help, but I still lose a few.
I've actually found it quite a useful tactic in worlds where I've located my base in extreme hills (i.e. places where a lot of wild animals tend to get trapped on ledges). When I notice the spawning of wild animals dropping off, I go to an area a long ways away and save and exit the game and then reload and hang around in that area for a bit to allow a bunch of new wild animals to spawn. Then I sprint back to my base... and because some of the ledge-trapped animals have despawned, I get animals spawning again around my base in more open locations.
I've just given up on trying to farm animals, it's not worth the effort at the moment. Also, keep an eye on your animals, because they may not be despawning in the traditional sense. For some reason, animals tend to walk into walls and stay there, and if one animal stands near a wall while the other walks into it, it forces the animal into the outside world and allows it to go free. I've seen animals do it purposefully, until a herd of 10 cows turned into one.
Meanwhile, I've never had a penned animal despawn. Not once. I've never made it a point to visit my farm regularly, or to save near it. I've never killed animals en route to my farm. I've mined extensively for hours on the other side of my world, saved there, and reloaded there. I have a double-high (not double-wide) fenced-in pen for mammals, 4 of each. The gate is a wooden door with 2-high wood planks on both sides, and fencing across the top of the planks and the door. It's about 10x10 on the inside--I need to double-check this, but I'm sure it's way smaller than 20x20. And I have a double-high iron-bar and 1-block sunken floor chicken coop with 9 chickens. I also have 5 tamed wolves sitting by the front porch of the farmhouse. The area is so busy that I get a lower frame rate than everywhere else in the world. No despawning. The animals can glitch through the fence, but then they bounce right back. I've had a wild wolf practically glued to outside of the pen's fence for long periods of time. No dead sheep.
Reading some of the comments above, it's like we're playing different games. So where are the differences? Maybe it's in how the game is played? My game is always offline. I'm usually connected to XBL (though not now, because I'm still on TU11) but "offline game" is perma-selected. I play solo, with my only forays into splitscreen being with another one of my profiles, just to test those waters. I don't slaughter some penned animals and then breed them again. I haven't changed their population in a long time. I used to have 6 of each mammal penned in, but I decided to pare it down to 4 to see if I could reduce lag in the area.
Don't know if that will help. I hope it does.
Edit: I should add that I usually play on Peaceful. I only tick that up to Easy when I'm visiting mob spawners and grinders.
I've just given up on trying to farm animals, it's not worth the effort at the moment. Also, keep an eye on your animals, because they may not be despawning in the traditional sense. For some reason, animals tend to walk into walls and stay there, and if one animal stands near a wall while the other walks into it, it forces the animal into the outside world and allows it to go free. I've seen animals do it purposefully, until a herd of 10 cows turned into one.
If you stand and watch this happening, you will clearly see that the animals pushed through the fence or wall does not "go free." It eventually "snaps" back into the pen or building. As of TU12, multiple animals do seem to be able to bunch up together in a single block. I have found many wild trapped animals in my swamp in single-block holes that, as I started killing them, I find they are 4 or 5 different animals. This is new to TU12 and, I suspect, that 4J will fix it in TU13. On the other hand, the phasing through fences and walls issue has been around since the inception of the game. However, as I said, it does not cause the permanent loss of animals that many people seem to think it does.
Meanwhile, I've never had a penned animal despawn. Not once. I've never made it a point to visit my farm regularly, or to save near it. I've never killed animals en route to my farm. I've mined extensively for hours on the other side of my world, saved there, and reloaded there. I have a double-high (not double-wide) fenced-in pen for mammals, 4 of each. The gate is a wooden door with 2-high wood planks on both sides, and fencing across the top of the planks and the door. It's about 10x10 on the inside--I need to double-check this, but I'm sure it's way smaller than 20x20. And I have a double-high iron-bar and 1-block sunken floor chicken coop with 9 chickens. I also have 5 tamed wolves sitting by the front porch of the farmhouse. The area is so busy that I get a lower frame rate than everywhere else in the world. No despawning. The animals can glitch through the fence, but then they bounce right back. I've had a wild wolf practically glued to outside of the pen's fence for long periods of time. No dead sheep.
Reading some of the comments above, it's like we're playing different games. So where are the differences? Maybe it's in how the game is played? My game is always offline. I'm usually connected to XBL (though not now, because I'm still on TU11) but "offline game" is perma-selected. I play solo, with my only forays into splitscreen being with another one of my profiles, just to test those waters. I don't slaughter some penned animals and then breed them again. I haven't changed their population in a long time. I used to have 6 of each mammal penned in, but I decided to pare it down to 4 to see if I could reduce lag in the area.
Don't know if that will help. I hope it does.
I have rarely had a penned animals despawn; but I think it is because the game will despawn naturally trapped animals first... so, the likelihood of this causing rampant despawns is rare. In one survival island world, I did lose a lot of them as I was moving them from the island where they were spawning to the island (across the map) I was living on. The problem that time, I think, was that I had not fed the animals I had moved any wheat yet. So, I think, in part, the game tells the difference between a player-trapped animal and domesticated one by "tagging" those that have been fed wheat. If you don't intend to breed them, then just do it one at a time and allow them to go out of love mode before you feed wheat to the next one.
Another issue is the careful construction of your pens. I Lol'd at myself recently for constructing a fenced pen inside a building (to keep the chickens safe from the ocelots) and I came back to find my chickens all loose inside the building rather than in the pen. The building itself was larger than 20 x 20, so if I had left the area, those chickens would have despawned. My issue was that I had forgotten about the window ledges - which were enabling the chickens to hop up onto them and then hop down on the other side of the fence. I thought that by now, with all the experimenting I have done with farming animals, I would have known better.
Its a little stranage how the farm animals despawn and yet my tamed wolf/dog hasn't?! I have had my 'pet' for absolutely ages now - I have him pernanently sitting inside my house whilst I go off on missions for hours at a time on the other side of the world and yet whenever I return - he's still there and the farm animals are not!!
... and to add to the confusion, there are posts around here about entire packs of wolves suddenly despawning!... so, I won't say that it just can't happen. However, in my experience, even wild wolves frequently don't despawn when the player goes off to the other side of the map. I've had one or two consistently lurking by my sheep pens on two different worlds pretty much since the start of the world. I've never tamed them and, although they can move, they don't seem to ever move much at all. Wolves are not part of the same cap as the other passive mobs, so that alone may have something to do with it - depending on what biomes you're playing in while you are away, the world may just not be spawning new wolves in order to exceed the wolf limit and trigger any of them despawning. It would probably be very, very unlikely that the cap would be exceeded by enough that the game would have to despawn a domestic wolf instead of a wild one.
Another issue is the careful construction of your pens. I Lol'd at myself recently for constructing a fenced pen inside a building (to keep the chickens safe from the ocelots) and I came back to find my chickens all loose inside the building rather than in the pen. The building itself was larger than 20 x 20, so if I had left the area, those chickens would have despawned. My issue was that I had forgotten about the window ledges - which were enabling the chickens to hop up onto them and then hop down on the other side of the fence. I thought that by now, with all the experimenting I have done with farming animals, I would have known better.
Haha! Yes. It has occurred to me that some of the problems people are having is that they leave a way for animals to escape, but they don't realize it. For example, having a chest for collecting wool or eggs right next to the fence. I did this when I first started playing. It was before animal pens. I was trying to keep animals from getting into my wheat crops. I had a chest on the outside of the wheat-farm fence to collect the wheat and seeds. Then I saw it. An animal hopped on the chest , on to the fence, and then down to the farm, where it proceeded to turn tilled land into dry dirt. Nooo! Ever since then, I've been digging the chests into the ground, with only the top showing. They used to look better there before they made them a bit smaller than the block size.
1 out of 2 cows keep disappearing from my 3 by 3 cow pen. What am I doing wrong here?
I only need 2 cows at all times. Breed the 2 cows to make a calf, kill 1 parent for leather, wait for calf to grow up, and repeat.
Perhaps have a double fence around the pen - my initial problem was similar - animals would despawn from within the pen and then respawn on the wrong side of it (ie on the outside). Since making my pen, 2 fences thick, the can now no longer despawn because there is no space on the other side of the first fence for them to land on!
So basically, make your pen like this:
F=Fence
A=Empty area
FFFFF
FFFFF
FFAFF
FFAFF
FFFFF
FFFFF
This way, the fence is 2 fences thick all the way around. If the animals despawn, they cannot land on the wrong side of the fence (the outside) as it is already occupied by the second layer of fencing.
Actually, I decided to make the pen 1 block into the ground and floating fence. That seems to be working for me and is much less bulky. Also more pleasant to look at.
Honestly this is the first time I've seen this bug in probably over 50 hours of play since the update. I believe sixstring is definitely on the correct track, the animal despawning issue has to be related more to the mob storage buffer. On my hardcore world, I have left 2 cows and 3 sheep penned while I have been exploring a ravine system on the other side of the map with no ill effects.
The only time I have ever lost an animal in a pen (prior to the note in the first paragraph) was when I accidentally bred my two guard dogs and the resultant puppy immediately went over and ate one of my sheep that was pressed up against the fence. (which shoudl tell 4J something about fence collision mechanics....
I think you're probably right. Overall, I think problem has been fourfold. 1. Some people trying to house animals in large pens (I did this myself and they all did despawn when I left the area). 2. Animals respawning on the wrong side of the fence when the game is saved, exited, and then re-entered. (I've witnessed this happen on several occasions 3. Wolves killing sheep through the fences (I've also witnessed this happen.) 4. Animals over the cap being bred or brought into the area (as sixstringstrummer has described).
I think people are reading what he said wrong. His statement implies there is some pathing routing that determines whether animal can move 20 blocks in any give direction and base don the result of this pathing sets the despawn flag.
That means, if there is some issue in the fence collision mechanics, it might be possible for the pathing logic to fail and to mark as a "wandering" mob when (to the viewer) it looks like they shouldn't be.
I think 4J made some key changes to make people happy and always able to find animals in their surroundings which broke the 'normal' behavior. Animals also seem a bit smarter on the PC version. I've never really found them in caves like i do on the xbox.
However someone above posted a really good idea and that is once an animal has been breed the baby and its parents shouldn't despawn and set to a perm passive.
HOWEVER, "supposed to" are the key words here. They will despawn even from small pens.
I find that if I spend more time near them. It seems to help if I exit the game near the pens instead of half way across the map.
I've learned something new about the animals since I made that post. IF you exit and save and reload your map far away from your animal pens, a bunch of new wild animals will spawn around you and the animal cap may get exceeded. This is because the chunk on which your animal pens are located hasn't been loaded until you walk back to them. If you get back too quickly and the chunk gets loaded while you still have too many animals in the world as a whole, the animals in the pens will despawn as the chunk is loaded. To prevent this from happening, I generally try to kill of some animals while I'm walking back to my base (IF I know I last loaded the world while I was away from my base. The other option is to always try to return to your base before exiting the world. I don't know yet how this might work differently when there is more than one player in the game.
I've actually found it quite a useful tactic in worlds where I've located my base in extreme hills (i.e. places where a lot of wild animals tend to get trapped on ledges). When I notice the spawning of wild animals dropping off, I go to an area a long ways away and save and exit the game and then reload and hang around in that area for a bit to allow a bunch of new wild animals to spawn. Then I sprint back to my base... and because some of the ledge-trapped animals have despawned, I get animals spawning again around my base in more open locations.
Reading some of the comments above, it's like we're playing different games. So where are the differences? Maybe it's in how the game is played? My game is always offline. I'm usually connected to XBL (though not now, because I'm still on TU11) but "offline game" is perma-selected. I play solo, with my only forays into splitscreen being with another one of my profiles, just to test those waters. I don't slaughter some penned animals and then breed them again. I haven't changed their population in a long time. I used to have 6 of each mammal penned in, but I decided to pare it down to 4 to see if I could reduce lag in the area.
Don't know if that will help. I hope it does.
Edit: I should add that I usually play on Peaceful. I only tick that up to Easy when I'm visiting mob spawners and grinders.
If you stand and watch this happening, you will clearly see that the animals pushed through the fence or wall does not "go free." It eventually "snaps" back into the pen or building. As of TU12, multiple animals do seem to be able to bunch up together in a single block. I have found many wild trapped animals in my swamp in single-block holes that, as I started killing them, I find they are 4 or 5 different animals. This is new to TU12 and, I suspect, that 4J will fix it in TU13. On the other hand, the phasing through fences and walls issue has been around since the inception of the game. However, as I said, it does not cause the permanent loss of animals that many people seem to think it does.
I have rarely had a penned animals despawn; but I think it is because the game will despawn naturally trapped animals first... so, the likelihood of this causing rampant despawns is rare. In one survival island world, I did lose a lot of them as I was moving them from the island where they were spawning to the island (across the map) I was living on. The problem that time, I think, was that I had not fed the animals I had moved any wheat yet. So, I think, in part, the game tells the difference between a player-trapped animal and domesticated one by "tagging" those that have been fed wheat. If you don't intend to breed them, then just do it one at a time and allow them to go out of love mode before you feed wheat to the next one.
Another issue is the careful construction of your pens. I Lol'd at myself recently for constructing a fenced pen inside a building (to keep the chickens safe from the ocelots) and I came back to find my chickens all loose inside the building rather than in the pen. The building itself was larger than 20 x 20, so if I had left the area, those chickens would have despawned. My issue was that I had forgotten about the window ledges - which were enabling the chickens to hop up onto them and then hop down on the other side of the fence. I thought that by now, with all the experimenting I have done with farming animals, I would have known better.
... and to add to the confusion, there are posts around here about entire packs of wolves suddenly despawning!... so, I won't say that it just can't happen. However, in my experience, even wild wolves frequently don't despawn when the player goes off to the other side of the map. I've had one or two consistently lurking by my sheep pens on two different worlds pretty much since the start of the world. I've never tamed them and, although they can move, they don't seem to ever move much at all. Wolves are not part of the same cap as the other passive mobs, so that alone may have something to do with it - depending on what biomes you're playing in while you are away, the world may just not be spawning new wolves in order to exceed the wolf limit and trigger any of them despawning. It would probably be very, very unlikely that the cap would be exceeded by enough that the game would have to despawn a domestic wolf instead of a wild one.
Haha! Yes. It has occurred to me that some of the problems people are having is that they leave a way for animals to escape, but they don't realize it. For example, having a chest for collecting wool or eggs right next to the fence. I did this when I first started playing. It was before animal pens. I was trying to keep animals from getting into my wheat crops. I had a chest on the outside of the wheat-farm fence to collect the wheat and seeds. Then I saw it. An animal hopped on the chest , on to the fence, and then down to the farm, where it proceeded to turn tilled land into dry dirt. Nooo! Ever since then, I've been digging the chests into the ground, with only the top showing. They used to look better there before they made them a bit smaller than the block size.
I only need 2 cows at all times. Breed the 2 cows to make a calf, kill 1 parent for leather, wait for calf to grow up, and repeat.
MCPE090REACTION.avi
-PotatOS1Gaming
Actually, I decided to make the pen 1 block into the ground and floating fence. That seems to be working for me and is much less bulky. Also more pleasant to look at.