Fix errors on world load when adding TCon to a world (Thx skyboy)

This commit is contained in:
Bernhard Bonigl committed 2015-02-21 21:25:00 +01:00
1 parent dfa83411bc
commit 8de3882dce
1 file changed
+4
@@ -144,6 +144,10 @@ public class KnapsackInventory implements IInventory
public void readFromNBT (NBTTagCompound tagCompound)
{
// player doesn't have a knapsack saved, tcon probably wasn't present before. don't error out.
if(!tagCompound.hasKey("Knapsack"))
return;
NBTTagList tagList = tagCompound.getTagList("Knapsack", 10);
for (int i = 0; i < tagList.tagCount(); ++i)
{