Phar - you seem to have tested extremes (in the chunk itself, and when the chunk is loaded). Perhaps some mid-distance tests may reveal more about passive mob spawning?
Also, Pontifex did a lot of testing with large towers - perhaps surface area affects passive mob spawning?
I think he means that no animals spawn in it initially.
I've seen animals spawn in it, initially. Read my testing parameters for biome specific species; All animals have to be in newly loaded chunks and seen spawning while the chunks are generating for the first time.
I've seen animals spawn in it, initially. Read my testing parameters for biome specific species; All animals have to be in newly loaded chunks and seen spawning while the chunks are generating for the first time.
If the code has what it has, then what you are seeing is perhaps deceptive. I would guess biome border errors. It has happened before with SMP wherein the client would totally miscalculate the biome positions, and I have noticed that at least in 1.7, snow would spawn on some places that ended up getting rained on, and it would snow in areas that did not have snow cover initially.
My suggestion is that the testing approach is not as fruitful as the code examination approach; the art of science is knowing the proper parameters to test. It seems in your tests, if what he said was in the code was correct, you failed to get the proper parameters.
Also, ocean does not have animals. Look for another explanation perhaps? Maybe a possibility of spawning initially but no chance of respawn?
Notice that "spawnableCreatureList" is emptied, and never added to. That list is checked any time a chunk in any biome is asked for a creature to spawn. An empty list means nothing spawns there.
Perhaps what OP is seeing is an optical illusion with a mob that wandered into the desert combined with a pop in at the limit of render distance?
If the code has what it has, then what you are seeing is perhaps deceptive. I would guess biome border errors. It has happened before with SMP wherein the client would totally miscalculate the biome positions, and I have noticed that at least in 1.7, snow would spawn on some places that ended up getting rained on, and it would snow in areas that did not have snow cover initially.
My suggestion is that the testing approach is not as fruitful as the code examination approach; the art of science is knowing the proper parameters to test. It seems in your tests, if what he said was in the code was correct, you failed to get the proper parameters.
Also, ocean does not have animals. Look for another explanation perhaps? Maybe a possibility of spawning initially but no chance of respawn?
here is what I believe is happening
Notice the quote. Notice the fact that the poster offered no proof (read; code) to support his claims. Granted, there could be biome specific spawning, but from what I've read from the code (read; proof), the only biome that had specific animals was Taiga, and the code was " spawnableCreatureList.add(new SpawnListEntry(net.minecraft.src.EntityWolf.class, 8, 4, 4));". Desert biome creation uses "spawnableCreatureList.clear();" which I believe (read; understand) means the normal spawnable creature list, without any additional mobs added.
Notice that "spawnableCreatureList" is emptied, and never added to. That list is checked any time a chunk in any biome is asked for a creature to spawn. An empty list means nothing spawns there.
Perhaps what OP is seeing is an optical illusion with a mob that wandered into the desert combined with a pop in at the limit of render distance?
This is also the same case as with an ocean,
public BiomeGenOcean(int i)
{
super(i);
spawnableCreatureList.clear();
}
Notice the quote. Notice the fact that the poster offered no proof (read; code) to support his claims. Granted, there could be biome specific spawning, but from what I've read from the code (read; proof), the only biome that had specific animals was Taiga, and the code was " spawnableCreatureList.add(new SpawnListEntry(net.minecraft.src.EntityWolf.class, 8, 4, 4));". Desert biome creation uses "spawnableCreatureList.clear();" which I believe (read; understand) means the normal spawnable creature list, without any additional mobs added.
Well, you need to look at the code yourself then. If he tells me he examined it, and I notice that you have not tested the supposed parameters - you were testing highly local parameters such as within, I guess, 5x5 chunks (not certain as to why 5x5 and not 1x1, but I digress) my only conclusion is you've managed to locate exceptions to the rule via either a calculation error or animal wandering.
Edit: clear would mean the list is emptied. If it were the normal list, nothing would be done to the list.
public BiomeGenOcean(int i)
{
super(i);
spawnableCreatureList.clear();
}
Just thought I need to throw that in too
You're right, I'm wrong, oddly, as I have seen animals spawn in a desert biome (With the white poofy stuff). The code specifically states that no spawnable creatures will load in either Ocean or Desert biomes. It also adds Wolves to certain biomes as well, and clears the spawnable list for Hell. I'm new to Java, but even I can understand that. OP has been updated with credits given.
OP is also being updated with new information from the video that was posted earlier, so check back within 10 or so minutes.
Also, River, if you'd like to help, suggest a test and give your theories?
Notice the quote. Notice the fact that the poster offered no proof (read; code) to support his claims. Granted, there could be biome specific spawning, but from what I've read from the code (read; proof), the only biome that had specific animals was Taiga, and the code was " spawnableCreatureList.add(new SpawnListEntry(net.minecraft.src.EntityWolf.class, 8, 4, 4));". Desert biome creation uses "spawnableCreatureList.clear();" which I believe (read; understand) means the normal spawnable creature list, without any additional mobs added.
This is where your reading is mistaken.
spawnableCreatureList is initially filled with values in the super class, when the constructor calls "super(i);". At that point the list contains the default values with their respective default probability weights (sheep:12, chicken:10, pig:10, cow:8)
spawnableCreatureList.clear() does just what it says. It completely erases the list. At that point the list is empty.
Forest, and Taiga add wolves to the list
Ocean, River, and Desert completely clear it.
Other biomes make no change.
as far as how this is used, animal type is selected in two spots, the chunk generation code, and the spawnerAnimal class.
In both places the call is similar to (this is from SpawnerAnimals.PerformSpawning(...) ):
BiomeGenBase var11 = var0.getWorldChunkManager().getBiomeGenAtChunkCoord(var10);
List var12 = var11.getSpawnableList(var36);
if(var12 != null && !var12.isEmpty()) {
SpawnListEntry var13 = (SpawnListEntry)WeightedRandom.func_35733_a(var0.rand, var12);
[lots of more code here]
where SpawnListEntry is an element of teh spawnableCreatureList
var0 is the global world class
var11 is the biome of the selected chunk
var12 is that biome's spawnableCreatureList
In the case of Desert, var12 is empty due to being cleared in the desert constructor. So the entire block of spawn code is skipped when the chunk is part of a Desert biome.
spawnableCreatureList is initially filled with values in the super class, when the constructor calls "super(i);". At that point the list contains the default values with their respective default probability weights (sheep:12, chicken:10, pig:10, cow:8)
spawnableCreatureList.clear() does just what it says. It completely erases the list. At that point the list is empty.
Forest, and Taiga add wolves to the list
Ocean, River, and Desert completely clear it.
Other biomes make no change.
as far as how this is used, animal type is selected in two spots, the chunk generation code, and the spawnerAnimal class.
In both places the call is similar to (this is from SpawnerAnimals.PerformSpawning(...) ):
BiomeGenBase var11 = var0.getWorldChunkManager().getBiomeGenAtChunkCoord(var10);
List var12 = var11.getSpawnableList(var36);
if(var12 != null && !var12.isEmpty()) {
SpawnListEntry var13 = (SpawnListEntry)WeightedRandom.func_35733_a(var0.rand, var12);
[lots of more code here]
where SpawnListEntry is an element of teh spawnableCreatureList
var0 is the global world class
var11 is the biome of the selected chunk
var12 is that biome's spawnableCreatureList
In the case of Desert, var12 is empty due to being cleared in the desert constructor. So the entire block of spawn code is skipped when the chunk is part of a Desert biome.
This was an amazing post. Not only do I agree with you, you just taught me what I've been trying to understand for a while. +1'd and linked in the OP. Thank you!
Thread updated and credits given. Here comes the shitstorm.
In my old game I got a pig and a sheep near my base (surrounded only by old chunks, mostly alpha) in my second day after updating to 1.8. Besides this lonely 2 animals (and the chicken I created using my stored eggs to make a chicken farm), I saw no other animal.
Therefore, I support the hypotesis that new animals do spawn, but very slowly (2 animals in more than 10 game days in my case).
In my old game I got a pig and a sheep near my base (surrounded only by old chunks, mostly alpha) in my second day after updating to 1.8. Besides this lonely 2 animals (and the chicken I created using my stored eggs to make a chicken farm), I saw no other animal.
Therefore, I support the hypotesis that new animals do spawn, but very slowly (2 animals in more than 10 game days in my case).
There's also some untested discussion about 1.7 converted chunks. Some people say they get more respawns in 1.7 chunks converted to 1.8 than they do in regular 1.8 chunks. I plan on testing it.
There's also some untested discussion about 1.7 converted chunks. Some people say they get more respawns in 1.7 chunks converted to 1.8 than they do in regular 1.8 chunks. I plan on testing it.
From a code standpoint, this is probably because the 1.7 chunks are all already generated, and are probably in a world large enough that the "15 or fewer animals currently loaded" test passes more easily. The 1.8 chunks are most likely on the edge of the known world, making it much harder to meet the 15-or-less test since causing the creation of any new 1.8 chunks will bring along new animals of their own.
From my own reading of the decompiled source, I can confirm the following:
There are now two spawning algorithms, the old continuous one and a new one that is run when chunks are generated
The old algorithm only allows animals to spawn every 400th tick, or 20 seconds, meaning they will spawn at 1/400th the rate that they used to
Other than the above, the conditions for animal spawning appear to be the same as before i.e. on grass with light level 8+, and a limit of 16 in all loaded chunks
Animals can't spawn in deserts or oceans but, like before, animal packs can overlap biome borders thus occasionally spawning in the "wrong" biome
When a chunk is generated, there is a 1/10 chance that the new spawning algorithm will run on it once (and 1/100 chance of it running twice, 1/1000 chance of it running three times, etc)
Each time it runs, the new algorithm will spawn up to 4 of one type of animal within a 16x16 area. It makes 16 attempts to find suitable spawning locations from among the topmost blocks in the area i.e. blocks that can see the sky
The new algorithm does the same three block test as the old one (opaque, non-opaque and non-liquid, non-opaque) but it does not check for grass, light level, or collisions (so animals can e.g. spawn inside a tree)
From my own reading of the decompiled source, I can confirm the following:
There are now two spawning algorithms, the old continuous one and a new one that is run when chunks are generated
The old algorithm only allows animals to spawn every 400th tick, or 20 seconds, meaning they will spawn at 1/400th the rate that they used to
Other than the above, the conditions for animal spawning appear to be the same as before i.e. on grass with light level 8+, and a limit of 16 in all loaded chunks
Animals can't spawn in deserts or oceans but, like before, animal packs can overlap biome borders thus occasionally spawning in the "wrong" biome
When a chunk is generated, there is a 1/10 chance that the new spawning algorithm will run on it once (and 1/100 chance of it running twice, 1/1000 chance of it running three times, etc)
Each time it runs, the new algorithm will spawn up to 4 of one type of animal within a 16x16 area. It makes 16 attempts to find suitable spawning locations from among the topmost blocks in the area i.e. blocks that can see the sky
The new algorithm does the same three block test as the old one (opaque, non-opaque and non-liquid, non-opaque) but it does not check for grass, light level, or collisions (so animals can e.g. spawn inside a tree)
From my own reading of the decompiled source, I can confirm the following:
There are now two spawning algorithms, the old continuous one and a new one that is run when chunks are generated
The old algorithm only allows animals to spawn every 400th tick, or 20 seconds, meaning they will spawn at 1/400th the rate that they used to
Other than the above, the conditions for animal spawning appear to be the same as before i.e. on grass with light level 8+, and a limit of 16 in all loaded chunks
Animals can't spawn in deserts or oceans but, like before, animal packs can overlap biome borders thus occasionally spawning in the "wrong" biome
When a chunk is generated, there is a 1/10 chance that the new spawning algorithm will run on it once (and 1/100 chance of it running twice, 1/1000 chance of it running three times, etc)
Each time it runs, the new algorithm will spawn up to 4 of one type of animal within a 16x16 area. It makes 16 attempts to find suitable spawning locations from among the topmost blocks in the area i.e. blocks that can see the sky
The new algorithm does the same three block test as the old one (opaque, non-opaque and non-liquid, non-opaque) but it does not check for grass, light level, or collisions (so animals can e.g. spawn inside a tree)
Animals can no longer despawn
Well.. I give a big "F U" to Notch for writing lazy code like no spawning at all in desert/ocean biomes. Seriously. That's lazy. If a player "terraforms" one of those to sustain animal life, they should spawn there. Period. Just like they would have before.
Maybe I can find a map editor to change biome type...
I think he means that no animals spawn in it initially.
I didn't do the testing, just FYI.
I've seen animals spawn in it, initially. Read my testing parameters for biome specific species; All animals have to be in newly loaded chunks and seen spawning while the chunks are generating for the first time.
If the code has what it has, then what you are seeing is perhaps deceptive. I would guess biome border errors. It has happened before with SMP wherein the client would totally miscalculate the biome positions, and I have noticed that at least in 1.7, snow would spawn on some places that ended up getting rained on, and it would snow in areas that did not have snow cover initially.
My suggestion is that the testing approach is not as fruitful as the code examination approach; the art of science is knowing the proper parameters to test. It seems in your tests, if what he said was in the code was correct, you failed to get the proper parameters.
Also, ocean does not have animals. Look for another explanation perhaps? Maybe a possibility of spawning initially but no chance of respawn?
Actually, I'm saying that this is the constructor for the desert biome class:
Notice that "spawnableCreatureList" is emptied, and never added to. That list is checked any time a chunk in any biome is asked for a creature to spawn. An empty list means nothing spawns there.
Perhaps what OP is seeing is an optical illusion with a mob that wandered into the desert combined with a pop in at the limit of render distance?
Notice the quote. Notice the fact that the poster offered no proof (read; code) to support his claims. Granted, there could be biome specific spawning, but from what I've read from the code (read; proof), the only biome that had specific animals was Taiga, and the code was " spawnableCreatureList.add(new SpawnListEntry(net.minecraft.src.EntityWolf.class, 8, 4, 4));". Desert biome creation uses "spawnableCreatureList.clear();" which I believe (read; understand) means the normal spawnable creature list, without any additional mobs added.
This is also the same case as with an ocean,
Just thought I need to throw that in too
Well, you need to look at the code yourself then. If he tells me he examined it, and I notice that you have not tested the supposed parameters - you were testing highly local parameters such as within, I guess, 5x5 chunks (not certain as to why 5x5 and not 1x1, but I digress) my only conclusion is you've managed to locate exceptions to the rule via either a calculation error or animal wandering.
Edit: clear would mean the list is emptied. If it were the normal list, nothing would be done to the list.
You're right, I'm wrong, oddly, as I have seen animals spawn in a desert biome (With the white poofy stuff). The code specifically states that no spawnable creatures will load in either Ocean or Desert biomes. It also adds Wolves to certain biomes as well, and clears the spawnable list for Hell. I'm new to Java, but even I can understand that. OP has been updated with credits given.
OP is also being updated with new information from the video that was posted earlier, so check back within 10 or so minutes.
Also, River, if you'd like to help, suggest a test and give your theories?
This is where your reading is mistaken.
spawnableCreatureList is initially filled with values in the super class, when the constructor calls "super(i);". At that point the list contains the default values with their respective default probability weights (sheep:12, chicken:10, pig:10, cow:8)
spawnableCreatureList.clear() does just what it says. It completely erases the list. At that point the list is empty.
Forest, and Taiga add wolves to the list
Ocean, River, and Desert completely clear it.
Other biomes make no change.
as far as how this is used, animal type is selected in two spots, the chunk generation code, and the spawnerAnimal class.
In both places the call is similar to (this is from SpawnerAnimals.PerformSpawning(...) ):
BiomeGenBase var11 = var0.getWorldChunkManager().getBiomeGenAtChunkCoord(var10);
List var12 = var11.getSpawnableList(var36);
if(var12 != null && !var12.isEmpty()) {
SpawnListEntry var13 = (SpawnListEntry)WeightedRandom.func_35733_a(var0.rand, var12);
[lots of more code here]
where SpawnListEntry is an element of teh spawnableCreatureList
var0 is the global world class
var11 is the biome of the selected chunk
var12 is that biome's spawnableCreatureList
In the case of Desert, var12 is empty due to being cleared in the desert constructor. So the entire block of spawn code is skipped when the chunk is part of a Desert biome.
This was an amazing post. Not only do I agree with you, you just taught me what I've been trying to understand for a while. +1'd and linked in the OP. Thank you!
Thread updated and credits given. Here comes the shitstorm.
Therefore, I support the hypotesis that new animals do spawn, but very slowly (2 animals in more than 10 game days in my case).
There's also some untested discussion about 1.7 converted chunks. Some people say they get more respawns in 1.7 chunks converted to 1.8 than they do in regular 1.8 chunks. I plan on testing it.
The short answer is "passive mobs attempt to spawn every 400 world clock ticks". In my debugger, I didn't time it but 20 seconds feels about right.
Thanks for the code. Updated and credits given, again :tongue.gif:
From a code standpoint, this is probably because the 1.7 chunks are all already generated, and are probably in a world large enough that the "15 or fewer animals currently loaded" test passes more easily. The 1.8 chunks are most likely on the edge of the known world, making it much harder to meet the 15-or-less test since causing the creation of any new 1.8 chunks will bring along new animals of their own.
Added to the OP :biggrin.gif:
Well.. I give a big "F U" to Notch for writing lazy code like no spawning at all in desert/ocean biomes. Seriously. That's lazy. If a player "terraforms" one of those to sustain animal life, they should spawn there. Period. Just like they would have before.
Maybe I can find a map editor to change biome type...