Skip to content

Commit

Permalink
Dont use alias!
Browse files Browse the repository at this point in the history
  • Loading branch information
cakoyo committed Jun 11, 2018
1 parent f46e639 commit 5f936eb
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ public class WeakEnchantmentManager {
@Shadow(aliases = "c") @Final private static EnchantmentManager.EnchantmentModifierThorns thorns;
@Shadow(aliases = "d") @Final private static EnchantmentManager.EnchantmentModifierArthropods arthropods;

@Shadow(aliases = "a") private static void applyEnchantmentModifierArray(EnchantmentManager.EnchantmentModifier modifier, Iterable<ItemStack> iterable) {}
@Shadow(aliases = "a") private static void applyEnchantmentModifier(EnchantmentManager.EnchantmentModifier modifier, ItemStack itemstack) {}
@Shadow private static void a(EnchantmentManager.EnchantmentModifier modifier, Iterable<ItemStack> iterable) {}
@Shadow private static void a(EnchantmentManager.EnchantmentModifier modifier, ItemStack itemstack) {}

@Overwrite
public static int a(Iterable<ItemStack> iterable, DamageSource damageSource) {
protection.a = 0; // PAIL: damageModifier
protection.b = damageSource;
applyEnchantmentModifierArray(protection, iterable);
a(protection, iterable); // PAIL: applyEnchantmentModifierArray
protection.b = null; // Akarin - Remove reference to Damagesource
return protection.a;
}
Expand All @@ -62,11 +62,11 @@ public static void a(EntityLiving user, Entity attacker) { // PAIL: applyThornEn
thorns.b = attacker;
thorns.a = user;
if (user != null) {
applyEnchantmentModifierArray(thorns, user.aQ()); // PAIL: getEquipmentAndArmor
a(thorns, user.aQ()); // PAIL: applyEnchantmentModifierArray - getEquipmentAndArmor
}

if (attacker instanceof EntityHuman) {
applyEnchantmentModifier(thorns, user.getItemInMainHand());
a(thorns, user.getItemInMainHand()); // PAIL: applyEnchantmentModifier
}

// Akarin Start - remove references to entity objects to avoid memory leaks
Expand All @@ -80,11 +80,11 @@ public static void b(EntityLiving user, Entity target) { // PAIL: applyArthropod
arthropods.a = user;
arthropods.b = target;
if (user != null) {
applyEnchantmentModifierArray(arthropods, user.aQ()); // PAIL: getEquipmentAndArmor
a(arthropods, user.aQ()); // PAIL: applyEnchantmentModifierArray - getEquipmentAndArmor
}

if (user instanceof EntityHuman) {
applyEnchantmentModifier(arthropods, user.getItemInMainHand());
a(arthropods, user.getItemInMainHand()); // PAIL: applyEnchantmentModifier
}

// Akarin Start - remove references to entity objects to avoid memory leaks
Expand Down

0 comments on commit 5f936eb

Please sign in to comment.