From 4b475d9fefdd6c1a4af1ea2499b0dcc70da3a1e2 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Thu, 15 May 2014 22:22:49 +0200 Subject: [PATCH] fixed crash when removing prematurely removing blueprint from library, close #1812 --- .../builders/TileBlueprintLibrary.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index e139fb6e..52f1b78b 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -123,7 +123,21 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { @Override public ItemStack decrStackSize(int i, int j) { - return inv.decrStackSize(i, j); + ItemStack result = inv.decrStackSize(i, j); + + if (i == 0) { + if (getStackInSlot(0) == null) { + progressIn = 0; + } + } + + if (i == 2) { + if (getStackInSlot(2) == null) { + progressOut = 0; + } + } + + return result; } @Override