Forestry

Forestry

65M Downloads

Crafttable with Crafttweaker recipe function

TrasHC opened this issue ยท 1 comments

commented

I am triying to change the recipe of the backpacks with crafttweaker. To keep the inventory I use

recipes.addShaped
("customDBagT2",
forestry:digger_bag_t2,
[[null,forestry:digger_bag.marked("bag"), null],[minecraft:string,ironchest:iron_chest:2,minecraft:string],[minecraft:wool:*,minecraft:wool:*,minecraft:wool:*]],
function(output, inputs, crafting) {
return forestry:digger_bag_t2.withTag(inputs.bag.tag);
},
null);

It works fine at normal worktables, but the forestry crafttable spams
ERROR: Could not execute RecipeFuntion
everytime you open the UI after the first craft.

I considered long and hard whether to post this here or at CraftTweaker... decided for here since opening JEI doesnt produce this error and I dont see, why the crafttable would try to call the function, before it tries to actually craft it. Sorry, if that's wrong :) Thnx for an awesome mod!

P.S.: Tried adding a conditional statement to check if theres is a NBT tag, didnt help either.

commented

Just found that there was not only the in game error but also sth in the CraftTweaker log... Now I'm double guessing myelf again, if I sould have posted at the CraftTweaker GitHub, although I count 7 "forestry" and only 3 "crafttweaker", that must be a good measure, right? :s

java.lang.NullPointerException
at ZenClassCrafttweakerForestry4.process(Unknown Source)
at crafttweaker.mc1120.recipes.MCRecipeShaped.getCraftingResult(MCRecipeShaped.java:109)
at crafttweaker.mc1120.recipes.MCRecipeShaped.func_77572_b(MCRecipeShaped.java:73)
at forestry.worktable.recipes.MemorizedRecipe.getOutputIcon(MemorizedRecipe.java:93)
at forestry.worktable.recipes.RecipeMemory.getRecipeDisplayOutput(RecipeMemory.java:127)
at forestry.worktable.gui.widgets.MemorizedRecipeSlot.getItemStack(MemorizedRecipeSlot.java:37)
at forestry.core.gui.widgets.ItemStackWidgetBase.getToolTip(ItemStackWidgetBase.java:43)
at forestry.core.gui.GuiUtil.drawToolTips(GuiUtil.java:79)
at forestry.core.gui.GuiForestry.func_146979_b(GuiForestry.java:234)
at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:117)
at forestry.core.gui.GuiForestry.func_73863_a(GuiForestry.java:109)
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:381)
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1124)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1118)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397)
at net.minecraft.client.main.Main.main(SourceFile:123)
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:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)