Merge pull request #1935 from superckl/master
Fixed two exceptions in BiomeDictionary related to adding new Biome Types.
This commit is contained in:
commit
1f6086c175
1 changed files with 10 additions and 1 deletions
|
@ -104,7 +104,16 @@ public class BiomeDictionary
|
||||||
Type ret = EnumHelper.addEnum(Type.class, name, new Class[]{Type[].class}, new Object[]{subTypes});
|
Type ret = EnumHelper.addEnum(Type.class, name, new Class[]{Type[].class}, new Object[]{subTypes});
|
||||||
if (ret.ordinal() >= typeInfoList.length)
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue