mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MC_XiaoHei <xor7xiaohei@gmail.com>
|
|
Date: Sat, 2 Aug 2025 14:38:52 +0800
|
|
Subject: [PATCH] Bring back LivingEntity effect CME
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
|
index 6c9a7ae3e9a340de35ca4dfcd486cfe5818d2aa5..782138474b1b2fab525de607f542f621ca92a0e8 100644
|
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -1151,7 +1151,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
|
public boolean addEffect(MobEffectInstance effectInstance, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause, boolean fireEvent) {
|
|
// Paper end - Don't fire sync event during generation
|
|
// org.spigotmc.AsyncCatcher.catchOp("effect add"); // Spigot // Paper - move to API
|
|
- if (this.isTickingEffects) {
|
|
+ if (this.isTickingEffects && cause == org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PLUGIN) { // Leaves - bring back LivingEntity effect CME
|
|
this.effectsToProcess.add(new ProcessableEffect(effectInstance, cause));
|
|
return true;
|
|
}
|