F3 debug shows wrong biome name, almost always says "Plains"
wwrpg opened this issue ยท 1 comments
When pressing F3, the Biome name is almost always Plains.
This appears to be because an invalid biomeID is being found in net\minecraft\world\Chunk.java getBiomeGenForWorldCoords method. And when an invalid biomeID is used to find a BiomeGenBase, it returns BiomeGenBase.plains.
/**
\* This method retrieves the biome at a set of coordinates
*/
public BiomeGenBase getBiomeGenForWorldCoords(int p_76591_1_, int p_76591_2_, WorldChunkManager p_76591_3_)
{
int k = this.blockBiomeArray[p_76591_2_ << 4 | p_76591_1_] & 255;
if (k == 255)
{
BiomeGenBase biomegenbase = p_76591_3_.getBiomeGenAt((this.xPosition << 4) + p_76591_1_, (this.zPosition << 4) + p_76591_2_);
k = biomegenbase.biomeID;
this.blockBiomeArray[p_76591_2_ << 4 | p_76591_1_] = (byte)(k & 255);
}
return BiomeGenBase.getBiome(k) == null ? BiomeGenBase.plains : BiomeGenBase.getBiome(k);
}
And the Debug in minecraft uses that method to get the biome name. See net\minecraft\client\gui\GuiIngame.java
Always returns BiomeGenBase.plains:
Chunk chunk = this.mc.theWorld.getChunkFromBlockCoords(j3, l3);
chunk.getBiomeGenForWorldCoords(j3 & 15, l3 & 15, this.mc.theWorld.getWorldChunkManager()).biomeName
Not sure how an invalid biomeID is coming up in the Chunk.java. When I tested getBiomeGenForCoords via the WorldObject and the player variable, I always got a valid Biome. So maybe it is just biomeIds stored in the Chunk.blockBiomeArray are all wrong...
Returns valid BiomeGenBase:
BiomeGenBase biome = player.worldObj.getBiomeGenForCoords(player.getPlayerCoordinates().posX, player.getPlayerCoordinates().posZ);