Add CME fix from remove curse to cure effects, fixes #489
This commit is contained in:
@@ -6,6 +6,8 @@ import net.minecraft.init.Items;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class CureEffects extends SpellBuff {
|
public class CureEffects extends SpellBuff {
|
||||||
|
|
||||||
public CureEffects(){
|
public CureEffects(){
|
||||||
@@ -22,7 +24,7 @@ public class CureEffects extends SpellBuff {
|
|||||||
|
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
for(PotionEffect effect : caster.getActivePotionEffects()){
|
for(PotionEffect effect : new ArrayList<>(caster.getActivePotionEffects())){ // Get outta here, CMEs
|
||||||
// The PotionEffect version (as opposed to Potion) does not call cleanup callbacks
|
// The PotionEffect version (as opposed to Potion) does not call cleanup callbacks
|
||||||
if(effect.isCurativeItem(milk)){
|
if(effect.isCurativeItem(milk)){
|
||||||
caster.removePotionEffect(effect.getPotion());
|
caster.removePotionEffect(effect.getPotion());
|
||||||
|
|||||||
Reference in New Issue
Block a user