3
0

Apply fixes from binary patches.

This commit is contained in:
gamerforEA
2015-03-25 08:24:42 +03:00
parent 16773ead6a
commit 099d1a7732
23 changed files with 604 additions and 431 deletions

View File

@ -0,0 +1,29 @@
--- ../src-base/minecraft/net/minecraftforge/common/ISpecialArmor.java
+++ ../src-work/minecraft/net/minecraftforge/common/ISpecialArmor.java
@@ -92,6 +92,11 @@
*/
public static float ApplyArmor(EntityLivingBase entity, ItemStack[] inventory, DamageSource source, double damage)
{
+ return ApplyArmor(entity, inventory, source, damage, true);
+ }
+
+ public static float ApplyArmor(EntityLivingBase entity, ItemStack[] inventory, DamageSource source, double damage, boolean applyDamage)
+ {
if (DEBUG)
{
System.out.println("Start: " + damage + " " + (damage * 25));
@@ -145,9 +150,12 @@
int itemDamage = (int)(absorb / 25D < 1 ? 1 : absorb / 25D);
if (stack.getItem() instanceof ISpecialArmor)
{
- ((ISpecialArmor)stack.getItem()).damageArmor(entity, stack, source, itemDamage, prop.Slot);
+ if (applyDamage)
+ {
+ ((ISpecialArmor) stack.getItem()).damageArmor(entity, stack, source, itemDamage, prop.Slot);
+ }
}
- else
+ else if(applyDamage)
{
if (DEBUG)
{