From 68346fde01bbc5dd9d237b9a0b642cdf4dd53697 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Mon, 9 Sep 2013 00:45:17 -0400 Subject: [PATCH] possible fix for crash loading old crates Detected when running a bukkit server so unsure if its a mcpc+ thing or an actual bug. --- .../dark/assembly/common/machine/TileEntityCrate.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java b/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java index 4ce026278..0bc45af63 100644 --- a/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java +++ b/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java @@ -242,7 +242,10 @@ public class TileEntityCrate extends TileEntityInv implements IPacketReceiver, I else { stack = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("stack")); - stack.stackSize = count; + if (stack != null) + { + stack.stackSize = count; + } } /* Only load sample stack if the read stack is valid */