Potions are not armor.
This commit is contained in:
parent
7a6193e8f5
commit
61dc035977
2 changed files with 4 additions and 8 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue