fix: Fixed potion effect desyncs in the codebase (lingering clientside-only potion effects with 0 duration)
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user