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

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

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