This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
SorceryCraft/src/main/java/com/thebrokenrail/sorcerycraft/spell/DissolveSpell.java

38 lines
913 B
Java
Raw Normal View History

2020-03-01 18:19:59 +00:00
package com.thebrokenrail.sorcerycraft.spell;
import com.thebrokenrail.sorcerycraft.spell.api.Spell;
2020-03-01 18:19:59 +00:00
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.Identifier;
2020-03-08 16:06:43 +00:00
import net.minecraft.world.World;
2020-03-01 18:19:59 +00:00
public class DissolveSpell extends Spell {
public DissolveSpell(Identifier id, int level) {
2020-03-01 18:19:59 +00:00
super(id, level);
}
@Override
2020-03-08 16:06:43 +00:00
public void execute(World world, Entity source, Entity attacker, Entity target) {
2020-03-01 18:19:59 +00:00
if (target instanceof LivingEntity) {
((LivingEntity) target).clearStatusEffects();
}
}
@Override
public int getXPCost() {
return 8;
2020-03-01 18:19:59 +00:00
}
@Override
public ItemStack getItemCost() {
return new ItemStack(Items.CLOCK);
}
@Override
public int getMaxLevel() {
return 1;
}
}