      }
  
      /**
-@@ -1096,12 +1157,22 @@
+@@ -857,6 +919,9 @@
+         this.experienceTotal = par1NBTTagCompound.getInteger("XpTotal");
+         this.setScore(par1NBTTagCompound.getInteger("Score"));
+ 
++        int tmp = par1NBTTagCompound.getInteger("MaxHealth");
++        maxHealth = (tmp <= 0 ? 20 : tmp);
++
+         if (this.sleeping)
+         {
+             this.playerLocation = new ChunkCoordinates(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+@@ -893,6 +958,7 @@
+         par1NBTTagCompound.setInteger("XpLevel", this.experienceLevel);
+         par1NBTTagCompound.setInteger("XpTotal", this.experienceTotal);
+         par1NBTTagCompound.setInteger("Score", this.getScore());
++        par1NBTTagCompound.setInteger("MaxHealth", maxHealth);
+ 
+         if (this.spawnChunk != null)
+         {
+@@ -1096,12 +1162,22 @@
      {
          if (!this.isEntityInvulnerable())
          {

             float f = 0.5F;
             float f1 = 0.5F;
 
@@ -1487,10 +1584,12 @@
         ChunkCoordinates chunkcoordinates = this.playerLocation;
         ChunkCoordinates chunkcoordinates1 = this.playerLocation;
 

     }
 
     /**
@@ -780,15 +826,28 @@
      */
     public void joinEntityItemWithWorld(EntityItem par1EntityItem)
     {
