From 61dc03597793087a18972d49db39c35f95d1a187 Mon Sep 17 00:00:00 2001 From: LexManos Date: Sat, 28 Jan 2012 07:34:39 +0000 Subject: [PATCH] Potions are not armor. --- .../minecraft/net/minecraft/src/EntityPlayer.java.patch | 6 ++---- .../net/minecraft/src/EntityPlayer.java.patch | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch b/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch index 1194daed6b..410dc27ab8 100644 --- a/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch @@ -93,12 +93,11 @@ public boolean canHarvestBlock(Block block) { return inventory.canHarvestBlock(block); -@@ -768,8 +824,26 @@ +@@ -768,7 +824,25 @@ { i = 1 + i >> 1; } - i = applyArmorCalculations(damagesource, i); -- i = applyPotionDamageCalculations(damagesource, i); + + boolean doRegularComputation = true; + int initialDamage = i; @@ -117,11 +116,10 @@ + if (doRegularComputation) + { + i = applyArmorCalculations(damagesource, i); -+ i = applyPotionDamageCalculations(damagesource, i); + } + i = applyPotionDamageCalculations(damagesource, i); addExhaustion(damagesource.getHungerDamage()); health -= i; - } @@ -815,7 +889,9 @@ public void destroyCurrentEquippedItem() diff --git a/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch b/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch index b581f9929a..b737bdbe70 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch @@ -103,12 +103,11 @@ public boolean canHarvestBlock(Block block) { return inventory.canHarvestBlock(block); -@@ -711,8 +770,26 @@ +@@ -711,7 +770,25 @@ { i = 1 + i >> 1; } - i = applyArmorCalculations(damagesource, i); -- i = applyPotionDamageCalculations(damagesource, i); + + boolean doRegularComputation = true; + int initialDamage = i; @@ -127,11 +126,10 @@ + if (doRegularComputation) + { + i = applyArmorCalculations(damagesource, i); -+ i = applyPotionDamageCalculations(damagesource, i); + } + i = applyPotionDamageCalculations(damagesource, i); addExhaustion(damagesource.getHungerDamage()); health -= i; - } @@ -758,7 +835,9 @@ public void destroyCurrentEquippedItem()