mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
21 lines
1.1 KiB
Diff
21 lines
1.1 KiB
Diff
|
--- a/net/minecraft/world/effect/HealOrHarmMobEffect.java
|
||
|
+++ b/net/minecraft/world/effect/HealOrHarmMobEffect.java
|
||
|
@@ -17,7 +17,7 @@
|
||
|
@Override
|
||
|
public boolean applyEffectTick(ServerLevel world, 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.hurtServer(world, entity.damageSources().magic(), (float) (6 << amplifier));
|
||
|
}
|
||
|
@@ -31,7 +31,7 @@
|
||
|
|
||
|
if (this.isHarm == target.isInvertedHealAndHarm()) {
|
||
|
j = (int) (proximity * (double) (4 << amplifier) + 0.5D);
|
||
|
- target.heal((float) j);
|
||
|
+ target.heal((float) j, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
|
||
|
} else {
|
||
|
j = (int) (proximity * (double) (6 << amplifier) + 0.5D);
|
||
|
if (effectEntity == null) {
|