BlindingShot.java 640 B

12345678910111213141516171819
  1. package me.km.effects.active;
  2. import me.km.effects.ActiveEffectBase;
  3. import me.km.effects.EffectUtils;
  4. import net.minecraft.entity.player.EntityPlayerMP;
  5. import net.minecraft.entity.projectile.EntityTippedArrow;
  6. import net.minecraft.init.MobEffects;
  7. public class BlindingShot extends ActiveEffectBase
  8. {
  9. @Override
  10. protected boolean executeEffect(EntityPlayerMP p, int power)
  11. {
  12. EntityTippedArrow arrow = EffectUtils.launchTippedArrow(p, power / 2d, MobEffects.BLINDNESS, power * 600, 0);
  13. arrow.setDamage(0.1);
  14. arrow.pickupStatus = EntityTippedArrow.PickupStatus.DISALLOWED;
  15. return true;
  16. }
  17. }