38 lines
913 B
Java
38 lines
913 B
Java
package com.thebrokenrail.sorcerycraft.spell;
|
|
|
|
import com.thebrokenrail.sorcerycraft.spell.api.Spell;
|
|
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;
|
|
import net.minecraft.world.World;
|
|
|
|
public class DissolveSpell extends Spell {
|
|
public DissolveSpell(Identifier id, int level) {
|
|
super(id, level);
|
|
}
|
|
|
|
@Override
|
|
public void execute(World world, Entity source, Entity attacker, Entity target) {
|
|
if (target instanceof LivingEntity) {
|
|
((LivingEntity) target).clearStatusEffects();
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public int getXPCost() {
|
|
return 8;
|
|
}
|
|
|
|
@Override
|
|
public ItemStack getItemCost() {
|
|
return new ItemStack(Items.CLOCK);
|
|
}
|
|
|
|
@Override
|
|
public int getMaxLevel() {
|
|
return 1;
|
|
}
|
|
}
|