Fix AIOOB in BiomeDictionary. Closes #1326
This commit is contained in:
parent
6fafbf3b09
commit
ba69a1a6fd
1 changed files with 6 additions and 1 deletions
|
@ -101,7 +101,12 @@ public class BiomeDictionary
|
|||
if (t.name().equals(name))
|
||||
return t;
|
||||
}
|
||||
return 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)
|
||||
{
|
||||
typeInfoList = Arrays.copyOf(typeInfoList, ret.ordinal());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue