Lucky.java 552 B

12345678910111213141516171819202122
  1. package me.km.effects.active;
  2. import me.km.effects.ActiveEffectBase;
  3. import net.minecraft.entity.player.EntityPlayerMP;
  4. import net.minecraft.init.MobEffects;
  5. import net.minecraft.potion.PotionEffect;
  6. public class Lucky extends ActiveEffectBase
  7. {
  8. @Override
  9. protected boolean executeEffect(EntityPlayerMP p, int power)
  10. {
  11. p.addPotionEffect(new PotionEffect(MobEffects.LUCK, 200 + 200 * power, 9));
  12. return true;
  13. }
  14. @Override
  15. protected int getManaCost(int manaFactor)
  16. {
  17. return 3 * manaFactor;
  18. }
  19. }