ModTweaker

ModTweaker

88M Downloads

Carpenter Remove Error

davqvist opened this issue · 3 comments

commented

If I do mods.forestry.Carpenter.removeRecipe(<forestry:chipsets>);
I get the following error:

java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableCollection.remove(Collections.java:1058) at modtweaker.mods.forestry.handlers.Carpenter$Remove.lambda$apply$1(Carpenter.java:146) at modtweaker.mods.forestry.handlers.Carpenter$Remove$$Lambda$1152/2001070049.accept(Unknown Source) at java.lang.Iterable.forEach(Iterable.java:75) at modtweaker.mods.forestry.handlers.Carpenter$Remove.apply(Carpenter.java:144) at minetweaker.runtime.MTTweaker.apply(MTTweaker.java:63) at minetweaker.MineTweakerAPI.apply(MineTweakerAPI.java:175) at modtweaker.mods.forestry.handlers.Carpenter.removeRecipe(Carpenter.java:129) at Forestry.__script__(Forestry.zs:57) at __ZenMain__.run(Forestry.zs) at minetweaker.runtime.MTTweaker.load(MTTweaker.java:158) at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:625) at minetweaker.MineTweakerImplementationAPI.lambda$static$10(MineTweakerImplementationAPI.java:72) at minetweaker.MineTweakerImplementationAPI$$Lambda$15/1825122856.execute(Unknown Source) at minetweaker.MineTweakerImplementationAPI$3.execute(MineTweakerImplementationAPI.java:610) at minetweaker.mc1102.server.MCServer$MCCommand.func_184881_a(MCServer.java:122) at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:104) at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:83) at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:913) at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:892) at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at net.minecraft.util.Util.func_181617_a(SourceFile:45) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:149) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) at java.lang.Thread.run(Thread.java:745)

The same happens when I do mods.forestry.Carpenter.removeRecipe(<forestry:chipsets>.withTag({T: 0 as short})); which is what I get with /mt hand or if I add <liquid:water> as second parameter. Still the recipe gets removed, but permanently which means that I execute the script a second time I get "No Forestry Carpenter Recipe found for forestry:chipsets. Command ignored!" Not sure if this is a problem with ModTweaker or Forestry. MC Version 1.10.2, ModTweaker 2.0.6, Forestry 5.2.16.324

commented

Okay cool, that's at least something. No worries.

commented

I now had a similar problem with adding a recipe. I did mods.forestry.Carpenter.addRecipe(<rftools:machine_frame>, [[<enderio:itemAlloy>, <actuallyadditions:itemCrystalEmpowered:1>, <enderio:itemAlloy>], [<actuallyadditions:itemCrystalEmpowered:1>, <enderio:itemMachinePart>, <actuallyadditions:itemCrystalEmpowered:1>], [<enderio:itemAlloy>, <actuallyadditions:itemCrystalEmpowered:1>, <enderio:itemAlloy>]], 20, <liquid:nutrient_distillation> * 1000);
I can't seem to find an error in this line. Still I get this error:

java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableCollection.add(Collections.java:1055) at modtweaker.mods.forestry.handlers.Carpenter$Add.lambda$apply$0(Carpenter.java:78) at modtweaker.mods.forestry.handlers.Carpenter$Add$$Lambda$1128/1028808550.accept(Unknown Source) at java.lang.Iterable.forEach(Iterable.java:75) at modtweaker.mods.forestry.handlers.Carpenter$Add.apply(Carpenter.java:76) at minetweaker.runtime.MTTweaker.apply(MTTweaker.java:63) at minetweaker.MineTweakerAPI.apply(MineTweakerAPI.java:175) at modtweaker.mods.forestry.handlers.Carpenter.addRecipe(Carpenter.java:51) at RFTools.__script__(RFTools.zs:16) at __ZenMain__.run(RFTools.zs) at minetweaker.runtime.MTTweaker.load(MTTweaker.java:158) at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:625) at minetweaker.MineTweakerImplementationAPI.onServerStart(MineTweakerImplementationAPI.java:534) at minetweaker.mc1102.MineTweakerMod.onServerStarting(MineTweakerMod.java:151) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:600) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) at net.minecraftforge.fml.common.Loader.serverStarting(Loader.java:845) at net.minecraftforge.fml.common.FMLCommonHandler.handleServerStarting(FMLCommonHandler.java:292) at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:122) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431) at java.lang.Thread.run(Thread.java:745)

I don't think there's an error in this line as this recipe gets added correctly, just like removing works. If I reload the script, I get no error anymore, but the recipe gets added a second time, just like removing the recipe is permanent. Did you have a chance already to look at this? Same versions as above, only Forestry now updated to the newest 5.2.16.329. I hope I'm not bothering you, I just hope this additional info helps finding this issue. Especially weird as adding other Carpenter recipes works fine, so maybe I'm just doing something wrong, I don't know.

commented