craftbukkit/nms-patches/net/minecraft/world/effect/HealOrHarmMobEffect.patch

21 lines
1 KiB
Diff
Raw Normal View History

2023-09-22 02:40:00 +10:00
--- a/net/minecraft/world/effect/HealOrHarmMobEffect.java
+++ b/net/minecraft/world/effect/HealOrHarmMobEffect.java
2024-10-23 02:15:00 +11:00
@@ -17,7 +17,7 @@
2024-04-24 01:15:00 +10:00
@Override
2024-10-23 02:15:00 +11:00
public boolean applyEffectTick(WorldServer worldserver, EntityLiving entityliving, int i) {
2023-09-22 02:40:00 +10:00
if (this.isHarm == entityliving.isInvertedHealAndHarm()) {
- entityliving.heal((float) Math.max(4 << i, 0));
+ entityliving.heal((float) Math.max(4 << i, 0), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
} else {
2024-10-23 02:15:00 +11:00
entityliving.hurtServer(worldserver, entityliving.damageSources().magic(), (float) (6 << i));
2023-09-22 02:40:00 +10:00
}
2025-03-26 03:05:00 +11:00
@@ -30,7 +30,7 @@
2023-09-22 02:40:00 +10:00
if (this.isHarm == entityliving.isInvertedHealAndHarm()) {
2025-03-26 03:05:00 +11:00
int j = (int) (d0 * (double) (4 << i) + 0.5D);
2023-09-22 02:40:00 +10:00
- entityliving.heal((float) j);
+ entityliving.heal((float) j, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
} else {
2025-03-26 03:05:00 +11:00
int k = (int) (d0 * (double) (6 << i) + 0.5D);