From 28897ac249ee16bb60cc74299a3447d04b773020 Mon Sep 17 00:00:00 2001
From: Robert S <rseifert.phone@gmail.com>
Date: Mon, 14 Apr 2014 20:10:45 -0400
Subject: [PATCH] Changed electrocution damage of wires to be handled by
 calc-core CustomDamage class

---
 .../electrical/wire/PartAdvancedWire.java          | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/electrical/src/main/scala/resonantinduction/electrical/wire/PartAdvancedWire.java b/electrical/src/main/scala/resonantinduction/electrical/wire/PartAdvancedWire.java
index d0853ec49..e81076d17 100644
--- a/electrical/src/main/scala/resonantinduction/electrical/wire/PartAdvancedWire.java
+++ b/electrical/src/main/scala/resonantinduction/electrical/wire/PartAdvancedWire.java
@@ -16,7 +16,6 @@ import net.minecraftforge.common.ForgeDirection;
 import resonantinduction.core.MultipartUtility;
 import resonantinduction.electrical.Electrical;
 import universalelectricity.api.CompatibilityModule;
-import universalelectricity.api.UniversalElectricity;
 import universalelectricity.api.electricity.IElectricalNetwork;
 import universalelectricity.api.energy.IConductor;
 import calclavia.lib.prefab.CustomDamageSource;
@@ -90,18 +89,7 @@ public abstract class PartAdvancedWire extends PartConductor
     public void onEntityCollision(Entity entity)
     {
         if (!this.isInsulated() && this.getNetwork() instanceof IElectricalNetwork)
-        {
-            float damage = 0;
-
-            if (this.getNetwork().getRequest() > 0)
-                damage = ((IElectricalNetwork) this.getNetwork()).getVoltage() / UniversalElectricity.DEFAULT_VOLTAGE;
-
-            if (damage > 0)
-            {
-                entity.attackEntityFrom(CustomDamageSource.electrocution, Math.min(damage, 10));
-                this.getNetwork().setBuffer((long) Math.max(0, this.getNetwork().getBuffer() - damage * 100));
-            }
-        }
+            CustomDamageSource.handleElectrocution(entity, this, (IElectricalNetwork) this.getNetwork(), 1);
     }
 
     @Override