Botania

Botania

133M Downloads

occasional crash when using crafting halo

xiaoschannel opened this issue · 5 comments

commented

I was making copper dust from IC2's tiny pile of copper dust. This don't always happens. I've sent this to eydamos as well.

Contact their authors BEFORE contacting forge

// Quite honestly, I wouldn't worry myself about that.

Time: 16/11/02 2:04
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at de.eydamos.backpack.util.NBTItemStackUtil.hasTag(NBTItemStackUtil.java:28)
at de.eydamos.backpack.util.NBTItemStackUtil.getString(NBTItemStackUtil.java:52)
at de.eydamos.backpack.tier.TierLeather.getTierByItemStack(TierLeather.java:47)
at de.eydamos.backpack.helper.BackpackHelper.initialize(BackpackHelper.java:23)
at de.eydamos.backpack.recipe.RecipeBackpackMedium.func_77572_b(RecipeBackpackMedium.java:42)
at net.minecraft.item.crafting.CraftingManager.func_82787_a(SourceFile:1235)
at net.minecraft.inventory.ContainerWorkbench.func_75130_a(SourceFile:54)
at net.minecraft.inventory.InventoryCrafting.func_70299_a(SourceFile:88)
at vazkii.botania.common.item.ItemCraftingHalo.validateRecipe(ItemCraftingHalo.java:160)
at vazkii.botania.common.item.ItemCraftingHalo.tryCraft(ItemCraftingHalo.java:151)
at vazkii.botania.common.item.ItemCraftingHalo.func_77659_a(ItemCraftingHalo.java:105)
at net.minecraft.item.ItemStack.func_77957_a(ItemStack.java:162)
at net.minecraft.client.multiplayer.PlayerControllerMP.func_187101_a(PlayerControllerMP.java:495)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1544)
at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2195)
at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:1961)
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1749)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1055)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:371)
at net.minecraft.client.main.Main.main(SourceFile:124)
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.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

commented

Doesn't look like my problem, not sure.

commented

Backpack dev replied

This is an issue caused by the crafting halo. It tries to get the result of the recipe without checking if the result can be crafted.

commented

To clearify this. getCraftingResult() gets called without previously checking if the content of the InventoryCrafting matches() the recipe. Because of this the items that are required to be at a specific slot are not present resulting in a null pointer exception further down the line in my code.
This is no issue in the vanilla crafting table. As far as I know only your Crafting Halo and the SparkHammer Hammer Crafting Table are having this issue.

commented

where is that done? in the halo code all we do is call vanilla's CraftingManager

commented

this shouldn't be an issue anymore in 1.12 (we use a CraftingManager util method that checks matches())