              par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
              this.addExhaustion(par1DamageSource.getHungerDamage());
              this.health -= par2;
-@@ -1125,6 +1196,10 @@
+@@ -1125,6 +1200,10 @@
  
      public boolean interactWith(Entity par1Entity)
      {

     }
 
     /**
@@ -1185,6 +1262,15 @@
      */
     public void attackTargetEntityWithCurrentItem(Entity par1Entity)
     {

     }
 
     /**
@@ -2159,7 +2278,14 @@
      */
     public void setCurrentItemOrArmor(int par1, ItemStack par2ItemStack)
     {
-        this.inventory.armorInventory[par1] = par2ItemStack;
+        if (par1 == 0)
+        {
+            this.inventory.mainInventory[this.inventory.currentItem] = par2ItemStack;
+        }
+        else
+        {
+            this.inventory.armorInventory[par1 - 1] = par2ItemStack;
+        }
     }
 
     public ItemStack[] getLastActiveItems()
