possible fix for crash loading old crates

Detected when running a bukkit server so unsure if its a mcpc+ thing or
an actual bug.
This commit is contained in:
DarkGuardsman 2013-09-09 00:45:17 -04:00
parent c07803de22
commit 68346fde01

View file

@ -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 */