{"action":"created","issue":{"url":"https://api.github.com/repos/BCA-Team/Buildcraft-Additions/issues/359","labels_url":"https://api.github.com/repos/BCA-Team/Buildcraft-Additions/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/BCA-Team/Buildcraft-Additions/issues/359/comments","events_url":"https://api.github.com/repos/BCA-Team/Buildcraft-Additions/issues/359/events","html_url":"https://github.com/BCA-Team/Buildcraft-Additions/issues/359","id":65807047,"number":359,"title":"Crash on assembly table assembling drill head","user":{"login":"TheLoneWolfling","id":2056317,"avatar_url":"https://avatars.githubusercontent.com/u/2056317?v=3","gravatar_id":"","url":"https://api.github.com/users/TheLoneWolfling","html_url":"https://github.com/TheLoneWolfling","followers_url":"https://api.github.com/users/TheLoneWolfling/followers","following_url":"https://api.github.com/users/TheLoneWolfling/following{/other_user}","gists_url":"https://api.github.com/users/TheLoneWolfling/gists{/gist_id}","starred_url":"https://api.github.com/users/TheLoneWolfling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheLoneWolfling/subscriptions","organizations_url":"https://api.github.com/users/TheLoneWolfling/orgs","repos_url":"https://api.github.com/users/TheLoneWolfling/repos","events_url":"https://api.github.com/users/TheLoneWolfling/events{/privacy}","received_events_url":"https://api.github.com/users/TheLoneWolfling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-02T00:39:17Z","updated_at":"2015-04-02T00:50:45Z","closed_at":null,"body":"It seems reproducible - just dump a *single* iron ingot, gold ingot, and tool core, tell the assembly table to make a drill head, and wait for it to craft. Crashlog is [here](http://pastebin.com/sCrzZFf2) - but the relevant section is below also.\r\n\r\nThis probably also causes crashes with other recipes that require multiples of a single item, although I haven't checked yet.\r\n\r\nIt seems like the assembly table doesn't handle your method of registering recipes that require multiples of a single item well. Not surprising, considering that BC itself doesn't have any assembly table recipes that require multiple of a single item.\r\n\r\n    java.lang.NullPointerException: Ticking block entity\r\n    \tat buildcraft.silicon.TileAssemblyTable.func_145845_h(TileAssemblyTable.java:99)\r\n    \tat net.minecraft.world.World.func_72939_s(World.java:1939)\r\n    \tat net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)\r\n    \tat net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)\r\n    \tat net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)\r\n    \tat net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:186)\r\n    \tat net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)\r\n    \tat net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)\r\n\r\nThis implies that something [here](https://github.com/BuildCraft/BuildCraft/blob/6.4.x/common/buildcraft/silicon/TileAssemblyTable.java#L99) is null - either `currentRecipe` is null (not possible due to the proceeding null check), or `currentRecipe.craft(<TileAssemblyTable>, false)` is null, or `currentRecipe.craft(<TileAssemblyTable>, false).crafted` is null. Either way, the fault lies with `currentRecipe`. `currentRecipe` is an `IFlexibleRecipe<ItemStack>`. So we jump there. \r\n\r\nFrom `IFlexibleRecipe<ItemStack>`, we jump to `FlexibleRecipe<ItemStack>`. (It could be something else implementing `IFlexibleRecipe<ItemStack>`, but as far as I can tell there aren't any.\r\n\r\nThere are two cases:\r\n\r\nFirst, for `IFlexibleRecipe<ItemStack>.craft(<TileAssemblyTable>, false)` ([here](https://github.com/BuildCraft/BuildCraft/blob/6.4.x/common/buildcraft/core/recipes/FlexibleRecipe.java#L98)) to be null. This implies that one of the requirements are not met. (Well, duh?). So I'm going to assume that's the case.\r\n\r\nThen the question becomes: why wasn't it caught earlier? Or rather: why did `currentRecipe.canBeCrafted(<TileAssemblyTable>)` return `true`? And the answer seems to lie [here](https://github.com/BuildCraft/BuildCraft/blob/6.4.x/common/buildcraft/core/recipes/FlexibleRecipe.java#L183) - namely that, when it's in the \"preview\" stage, it doesn't actually decrement anything. So it sees the three different stacks of one iron ingot each, checks \"is there at least one iron\" 3x, which there is. So it thinks it can craft it when it actually cannot.\r\n\r\nThe fix, it would seem, would be to [here](https://github.com/BCA-Team/Buildcraft-Additions/blob/90397f6426e9759ecaf7be90ccbce67338be6873/src/main/java/buildcraftAdditions/reference/ItemsAndBlocks.java#L564) change the repeated strings to one itemstack for each item, containing the multiples. Though, that being said, that would mess up ore dictionary integration, if that matters. It may be better to build your own list of alternatives with OreDict.getOres.\r\n\r\nHopefully this gets fixed - as is it's rather hampering my attempts at automating my assembly tables. Occasionally there's a delay in one of the inputs and it crashes the game, not fun.\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/BCA-Team/Buildcraft-Additions/issues/comments/88676429","html_url":"https://github.com/BCA-Team/Buildcraft-Additions/issues/359#issuecomment-88676429","issue_url":"https://api.github.com/repos/BCA-Team/Buildcraft-Additions/issues/359","id":88676429,"user":{"login":"TheLoneWolfling","id":2056317,"avatar_url":"https://avatars.githubusercontent.com/u/2056317?v=3","gravatar_id":"","url":"https://api.github.com/users/TheLoneWolfling","html_url":"https://github.com/TheLoneWolfling","followers_url":"https://api.github.com/users/TheLoneWolfling/followers","following_url":"https://api.github.com/users/TheLoneWolfling/following{/other_user}","gists_url":"https://api.github.com/users/TheLoneWolfling/gists{/gist_id}","starred_url":"https://api.github.com/users/TheLoneWolfling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheLoneWolfling/subscriptions","organizations_url":"https://api.github.com/users/TheLoneWolfling/orgs","repos_url":"https://api.github.com/users/TheLoneWolfling/repos","events_url":"https://api.github.com/users/TheLoneWolfling/events{/privacy}","received_events_url":"https://api.github.com/users/TheLoneWolfling/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T00:50:45Z","updated_at":"2015-04-02T00:50:45Z","body":"Welp, the world is now crashing on load with the same error. Of course it is - it saved partway through the assembly table crafting the broken recipe."}}