Temporary fix for belts being activatable after death #1217

This does not solve the problem, only prevent the crash. It'll cause clientside desyncs until the belt is re-equipped.
This commit is contained in:
Bernhard Bonigl committed 2014-12-21 23:35:42 +01:00
1 parent 139b1fb1b0
commit 224a3d45df
2 files changed
+9 -6

No files matched your search

@@ -28,6 +28,9 @@ public class PlayerAbilityHelper
{
NBTTagList slots = new NBTTagList();
InventoryPlayer hotbar = player.inventory;
ItemStack belt = armor.inventory[3];
if(belt == null)
return;
NBTTagCompound itemTag;
@@ -43,7 +46,6 @@ public class PlayerAbilityHelper
hotbar.mainInventory[i] = null;
}
ItemStack belt = armor.inventory[3];
NBTTagList replaceSlots = belt.getTagCompound().getTagList("Inventory", 10);
for (int i = 0; i < replaceSlots.tagCount(); ++i)
{