12345678910111213141516171819 |
- package me.km.effects.active;
- import me.km.KajetansMod;
- import me.km.effects.ActiveEffectBase;
- import net.minecraft.entity.player.EntityPlayerMP;
- public class TimedHeal extends ActiveEffectBase
- {
- @Override
- protected boolean executeEffect(EntityPlayerMP p, int power)
- {
- float amount = (p.getMaxHealth() * power) / 100F;
- for(int i = 1; i < 6; i++)
- {
- KajetansMod.scheduler.scheduleTask(() -> p.heal(amount), i * 20);
- }
- return true;
- }
- }
|