import { MolangVariableMap, world } from "@minecraft/server";

export function spawnParticle(particle, location, dimension) {
  let tint = new MolangVariableMap();
  tint.setFloat("r", 0);
  tint.setFloat("g", 0);
  tint.setFloat("b", 0);
  world.getDimension(dimension.id).spawnParticle(particle, location, tint);
}

export function spawnParticleAtPlayer(player, particle, location) {
  let tint = new MolangVariableMap();
  tint.setFloat("r", 0);
  tint.setFloat("g", 0);
  tint.setFloat("b", 0);
  player.dimension.spawnParticle(particle, location, tint);
}