Merge pull request #1935 from superckl/master

Fixed two exceptions in BiomeDictionary related to adding new Biome Types.
This commit is contained in:
LexManos 2015-06-12 17:47:32 -07:00
commit 1f6086c175
1 changed files with 10 additions and 1 deletions

View File

@ -104,7 +104,16 @@ public class BiomeDictionary
Type ret = EnumHelper.addEnum(Type.class, name, new Class[]{Type[].class}, new Object[]{subTypes});
if (ret.ordinal() >= typeInfoList.length)
{
typeInfoList = Arrays.copyOf(typeInfoList, ret.ordinal());
typeInfoList = Arrays.copyOf(typeInfoList, ret.ordinal()+1);
}
for(BiomeInfo bInfo:biomeList)
{
if(bInfo != null)
{
EnumSet<Type> oldSet = bInfo.typeList;
bInfo.typeList = EnumSet.noneOf(Type.class);
bInfo.typeList.addAll(oldSet);
}
}
return ret;
}