mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
21 lines
1,016 B
Diff
21 lines
1,016 B
Diff
|
--- a/net/minecraft/world/effect/HealOrHarmMobEffect.java
|
||
|
+++ b/net/minecraft/world/effect/HealOrHarmMobEffect.java
|
||
|
@@ -16,7 +_,7 @@
|
||
|
@Override
|
||
|
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {
|
||
|
if (this.isHarm == entity.isInvertedHealAndHarm()) {
|
||
|
- entity.heal(Math.max(4 << amplifier, 0));
|
||
|
+ entity.heal(Math.max(4 << amplifier, 0), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
|
||
|
} else {
|
||
|
entity.hurtServer(level, entity.damageSources().magic(), 6 << amplifier);
|
||
|
}
|
||
|
@@ -30,7 +_,7 @@
|
||
|
) {
|
||
|
if (this.isHarm == entity.isInvertedHealAndHarm()) {
|
||
|
int i = (int)(health * (4 << amplifier) + 0.5);
|
||
|
- entity.heal(i);
|
||
|
+ entity.heal(i, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
|
||
|
} else {
|
||
|
int i = (int)(health * (6 << amplifier) + 0.5);
|
||
|
if (source == null) {
|