Fix AIOOB in BiomeDictionary. Closes #1326

This commit is contained in:
Lex Manos 2014-08-14 20:33:23 -07:00
parent 6fafbf3b09
commit ba69a1a6fd

View file

@ -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;
}
}