fix: Fixed potion effect desyncs in the codebase (lingering clientside-only potion effects with 0 duration)

This commit is contained in:
WinDanesz
2026-05-11 16:35:12 +00:00
parent ba71f2ae4a
commit 032f1aa1a3
25 changed files with 115 additions and 71 deletions
@@ -120,8 +120,10 @@ public class MindControl extends SpellRay {
}
public static void startControlling(EntityLiving target, EntityLivingBase controller, int duration){
target.getEntityData().setUniqueId(NBT_KEY, controller.getUniqueID());
target.addPotionEffect(new PotionEffect(WizardryPotions.mind_control, duration, 0));
if(!target.world.isRemote){
target.getEntityData().setUniqueId(NBT_KEY, controller.getUniqueID());
target.addPotionEffect(new PotionEffect(WizardryPotions.mind_control, duration, 0));
}
}
/**
@@ -238,4 +240,4 @@ public class MindControl extends SpellRay {
}
}
}
}