java.lang.ArrayIndexOutOfBoundsException in CraftingItem.class
ShenTengTu opened this issue ยท 3 comments
Hi,I am testing the compatibility of my mod Large Sign with Tinkers Construct + Mantle,then I get the crash report as below when my mod want to get the icon:
http://pastebin.com/7yk0mt1h
There is ArrayIndexOutOfBoundsException in CraftingItem,I hope you can take a look,thanks.
I originally using Mantle 0.3.1 and 0.3.2 jar file to test in actual game environment,then I get the crash report.Now I import Mantle source code to my project to debug.
In my project ,I want to get icons of all items in game.There are 4 Mantle item with meta but the length of icons
array in CraftingItem
class is 1,that's why I get ArrayIndexOutOfBoundsException when call func_77617_a (int meta) /getIconFromDamage(int meta)
.
Finally I found the problem in Mantle
class as below:
public void postInit (FMLPostInitializationEvent evt)
{
logger.info("Entering postinitialization phase.");
proxy.readManuals();
BookData data = new BookData();
data.unlocalizedName = "item.mantle.manual.test";
data.toolTip = "Test Book";
data.modID = CoreRepo.modId;
BookDataStore.addBook(data);
mantleBook.updateManual();//Cause of the problem
CoreConfig.loadBookLocations();
IDDumps.dump();
}
Cause of the problem is mantleBook.updateManual()
,it will Change length of icons
from 4 to 1.
I hide it then run successfully with my mod.