Concurrent Mod Exception when using ChopSaw CT Integration
Version : FactoryTech-1.12.2-1.5.1
CT : CraftTweaker2-1.12-4.1.9
Forge : 2713
Documentation source : https://minecraft.curseforge.com/projects/factory-tech
Description of Issue: I'm attempting to test the mod for inclusion in a pack. I've used the below simple script in order to attempt adjusting the wood output of a ChopSaw.
import mods.factorytech.ChopSaw;
mods.factorytech.ChopSaw.removeRecipe(<minecraft:planks:0> * 6);
Error Generated:
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: factorytech.zs}
[INITIALIZATION][CLIENT][INFO] Removing Chop Saw recipe for 6xtile.wood@0
[INITIALIZATION][CLIENT][ERROR] [crafttweaker]: Error executing {[0:crafttweaker]: factorytech.zs}: null
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
at java.util.ArrayList$Itr.next(Unknown Source)
at dalapo.factech.plugins.crafttweaker.ChopSaw$Remove.apply(ChopSaw.java:98)
at crafttweaker.runtime.CrTTweaker.apply(CrTTweaker.java:51)
at crafttweaker.CraftTweakerAPI.apply(CraftTweakerAPI.java:135)
at dalapo.factech.plugins.crafttweaker.ChopSaw.removeRecipe(ChopSaw.java:56)
at Factorytech.__script__(factorytech.zs:3)
at __ZenMain__.run(Factorytech)
at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:174)
at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:68)
at crafttweaker.runtime.CrTTweaker.load(CrTTweaker.java:62)
at crafttweaker.CrafttweakerImplementationAPI.load(CrafttweakerImplementationAPI.java:115)
at crafttweaker.mc1120.events.CommonEventHandler.registerRecipes(CommonEventHandler.java:55)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_75_CommonEventHandler_registerRecipes_Register.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:750)
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:622)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:742)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:329)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:534)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Attempted workarounds:
- Switching to oredict (no method overload for it)
- Excluding the meta tag
- Switching to oreDict.firstItem
Notes:
- The exact example given in documentation, using minecraft:sticks, does in fact work as expected.
- My best guess is that there is a problem with items that have meta data.
- Can paste-bin future stacktraces upon request if preferred.
Edited by pyure