--- a/net/minecraft/world/effect/HealOrHarmMobEffect.java
+++ b/net/minecraft/world/effect/HealOrHarmMobEffect.java
@@ -5,6 +5,7 @@
 import net.minecraft.world.entity.LivingEntity;
 
 class HealOrHarmMobEffect extends InstantenousMobEffect {
+
     private final boolean isHarm;
 
     public HealOrHarmMobEffect(MobEffectCategory category, int color, boolean damage) {
@@ -15,9 +16,9 @@
     @Override
     public boolean applyEffectTick(LivingEntity entity, int amplifier) {
         if (this.isHarm == entity.isInvertedHealAndHarm()) {
-            entity.heal((float)Math.max(4 << amplifier, 0));
+            entity.heal((float) Math.max(4 << amplifier, 0), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
         } else {
-            entity.hurt(entity.damageSources().magic(), (float)(6 << amplifier));
+            entity.hurt(entity.damageSources().magic(), (float) (6 << amplifier));
         }
 
         return true;
@@ -25,16 +26,19 @@
 
     @Override
     public void applyInstantenousEffect(@Nullable Entity source, @Nullable Entity attacker, LivingEntity target, int amplifier, double proximity) {
+        int j;
+
         if (this.isHarm == target.isInvertedHealAndHarm()) {
-            int i = (int)(proximity * (double)(4 << amplifier) + 0.5);
-            target.heal((float)i);
+            j = (int) (proximity * (double) (4 << amplifier) + 0.5D);
+            target.heal((float) j, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
         } else {
-            int j = (int)(proximity * (double)(6 << amplifier) + 0.5);
+            j = (int) (proximity * (double) (6 << amplifier) + 0.5D);
             if (source == null) {
-                target.hurt(target.damageSources().magic(), (float)j);
+                target.hurt(target.damageSources().magic(), (float) j);
             } else {
-                target.hurt(target.damageSources().indirectMagic(source, attacker), (float)j);
+                target.hurt(target.damageSources().indirectMagic(source, attacker), (float) j);
             }
         }
+
     }
 }
