From c755af8ac1c944e18d8075e186dfcdd6bb02bd39 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sun, 23 Nov 2014 11:02:40 +0100 Subject: [PATCH] fix #2225 --- common/buildcraft/builders/TileBuilder.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 75ce2f03..c2608cbb 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -317,13 +317,14 @@ public class TileBuilder extends TileAbstractBuilder implements IHasWork, IFluid bpt = bpt.adjustToWorld(worldObj, x, y, z, o); - if (getStackInSlot(0).getItem() instanceof ItemBlueprintStandard) { - return new BptBuilderBlueprint((Blueprint) bpt, worldObj, x, y, z); - } else if (getStackInSlot(0).getItem() instanceof ItemBlueprintTemplate) { - return new BptBuilderTemplate(bpt, worldObj, x, y, z); - } else { - return null; + if (bpt != null) { + if (getStackInSlot(0).getItem() instanceof ItemBlueprintStandard) { + return new BptBuilderBlueprint((Blueprint) bpt, worldObj, x, y, z); + } else if (getStackInSlot(0).getItem() instanceof ItemBlueprintTemplate) { + return new BptBuilderTemplate(bpt, worldObj, x, y, z); + } } + return null; } public void iterateBpt(boolean forceIterate) {