Merge pull request #530 from Azanor/master

Fix for BiomeDictionary.getTypesForBiome throwing a ClassCastException when called.
This commit is contained in:
LexManos 2013-04-19 10:52:30 -07:00
commit 74742fd12f

View file

@ -98,7 +98,7 @@ public class BiomeDictionary
{
if(typeInfoList[type.ordinal()] != null)
{
return (BiomeGenBase[])typeInfoList[type.ordinal()].toArray();
return (BiomeGenBase[])typeInfoList[type.ordinal()].toArray(new BiomeGenBase[0]);
}
return new BiomeGenBase[0];
@ -116,7 +116,7 @@ public class BiomeDictionary
if(biomeList[biome.biomeID] != null)
{
return (Type[])biomeList[biome.biomeID].typeList.toArray();
return (Type[])biomeList[biome.biomeID].typeList.toArray(new Type[0]);
}
return new Type[0];
@ -298,4 +298,4 @@ public class BiomeDictionary
registerBiomeType(extremeHillsEdge, MOUNTAIN );
registerBiomeType(mushroomIslandShore, MUSHROOM, BEACH);
}
}
}