import { world } from "@minecraft/server";
import { castSpellProjectile } from "./Spells";

//Function run when using the spell
export function explosionSpell(player) {
  player.sendMessage(`<${player.nameTag}> Explosion spell!`);
  castSpellProjectile(player, "blockception_magic:explosion_spell", 1.5);
}

export function explosionSpellEvent(location, dimension) {
  world.getDimension(dimension.id).spawnEntity('blockception_magic:explosion_spell_explosion', location);
}