mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
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 file changed
+10
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user