mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-20 03:59:36 +00:00
Fix ConcurrentModificationException in ItemShieldFocus (#95)
This commit is contained in:
1 file changed
+5
-1
@@ -1,5 +1,8 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
@@ -50,7 +53,8 @@ public class ItemShieldFocus extends ItemBaseFocus {
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
for (PotionEffect effect : player.getActivePotionEffects()) {
|
||||
List<PotionEffect> potionEffects = new ArrayList<>(player.getActivePotionEffects());
|
||||
for (PotionEffect effect : potionEffects) {
|
||||
IC2.platform.removePotion(player, effect.getPotionID());
|
||||
}
|
||||
if (!player.capabilities.isCreativeMode
|
||||
|
||||
Reference in new issue
Block a user