package me.km.effects.active; import me.km.effects.ActiveEffectBase; import me.km.effects.EffectUtils; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.MobEffects; public class Freeze extends ActiveEffectBase { @Override protected boolean executeEffect(EntityPlayerMP p, int power) { int time = power * 200; EffectUtils.getEntsOfNotGuild(p, 1 + power * 2).stream().forEach((m) -> { EffectUtils.addPotionTo(m, MobEffects.SLOWNESS, time, 200); EffectUtils.addPotionTo(m, MobEffects.WEAKNESS, time, 200); }); return true; } @Override protected int getManaCost(int manaFactor) { return 6 * manaFactor; } }