Thaumcraft Fix

Thaumcraft Fix

23.3k Downloads

Log spams with Thaumic Restoration

mczph opened this issue ยท 1 comments

commented

This is a continuation of the previous issue, the lag issue has been resolved, so I mistakenly thought this one had been fixed, but it looks like they are not caused by the same issue.

Spams(Also happens when ThaumicJEI is caching aspects,they won't appear if the cache is over):

[22:33:49] [ThaumicJEI Aspect Cache/ERROR] [thaumcraftfix]: Failed calling IRecipe#matches
java.lang.ArrayIndexOutOfBoundsException: 0
	at com.Zoko061602.ThaumicRestoration.crafting.recipe.RecipeCrystal.matches(RecipeCrystal.java:26) ~[RecipeCrystal.class:?]
	at thecodex6824.thaumcraftfix.core.transformer.MiscTransformers$Hooks.createFilledInventoryForRecipe(MiscTransformers.java:131) ~[ThaumcraftFix-1.12.2-1.0.3.jar:?]
	at thaumcraft.common.lib.crafting.ThaumcraftCraftingManager.getAspectsFromIngredients(ThaumcraftCraftingManager.java:550) ~[ThaumcraftCraftingManager.class:?]
	at thaumcraft.common.lib.crafting.ThaumcraftCraftingManager.generateTagsFromCraftingRecipes(ThaumcraftCraftingManager.java:514) ~[ThaumcraftCraftingManager.class:?]
	at thaumcraft.common.lib.crafting.ThaumcraftCraftingManager.generateTagsFromRecipes(ThaumcraftCraftingManager.java:604) ~[ThaumcraftCraftingManager.class:?]
	at thaumcraft.common.lib.crafting.ThaumcraftCraftingManager.generateTags(ThaumcraftCraftingManager.java:425) ~[ThaumcraftCraftingManager.class:?]
	at thaumcraft.common.lib.crafting.ThaumcraftCraftingManager.getObjectTags(ThaumcraftCraftingManager.java:179) ~[ThaumcraftCraftingManager.class:?]
	at thaumcraft.common.lib.crafting.ThaumcraftCraftingManager.getObjectTags(ThaumcraftCraftingManager.java:143) ~[ThaumcraftCraftingManager.class:?]
	at thaumcraft.common.lib.InternalMethodHandler.getObjectAspects(InternalMethodHandler.java:86) ~[InternalMethodHandler.class:?]
	at thaumcraft.api.aspects.AspectHelper.getObjectAspects(AspectHelper.java:69) ~[AspectHelper.class:?]
	at thaumcraft.api.aspects.AspectList.<init>(AspectList.java:21) ~[AspectList.class:?]
	at com.buuz135.thaumicjei.ThaumcraftJEIPlugin.createAspectsFile(ThaumcraftJEIPlugin.java:224) ~[ThaumcraftJEIPlugin.class:?]
	at com.buuz135.thaumicjei.ThaumcraftJEIPlugin.lambda$register$3(ThaumcraftJEIPlugin.java:134) ~[ThaumcraftJEIPlugin.class:?]
	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_402]
commented

This log message was introduced from the last "fix" - it prints an error every time it comes across that recipe instead of crashing / throwing an exception. I changed it so now each individual recipe will only print 1 exception to the log per game run.