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/registry/Spell.java

40 lines
912 B
Java

package com.thebrokenrail.sorcerycraft.spell.registry;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.world.World;
public abstract class Spell {
private final Identifier id;
private final int level;
public Spell(Identifier id, int level) {
this.id = id;
this.level = level;
}
public Identifier getID() {
return id;
}
public int getLevel() {
return level;
}
public void execute(World world, Entity source, Entity attacker, Entity target) {
// NOOP
}
public void execute(World world, Entity source, Entity attacker, BlockHitResult hitResult) {
// NOOP
}
public abstract int getXPCost();
public abstract ItemStack getItemCost();
public abstract int getMaxLevel();
}