import { MolangVariableMap } from '@minecraft/server';
import WBVector3 from '../util/wbVector3';
export default function createWitherWraithSkullHitEffect(location) {
    // Spawn the particle
    for (let i = 0; i < 40; i++) {
        const variableMap = new MolangVariableMap();
        variableMap.setVector3('direction', {
            x: Math.random() * 2 - 1,
            y: Math.random() * 2 - 1,
            z: Math.random() * 2 - 1
        });
        location.dimension.spawnParticle('minecraft:soul_particle', WBVector3.fromMC(location).add({
            x: Math.random() * 4 - 2,
            y: 0.5 + Math.random() * 3 - 1.5,
            z: Math.random() * 4 - 2
        }), variableMap);
    }
    // Play the sound
    location.dimension.playSound('twb_wisu:witherboss.attack.skull_projectile.hit', location, { volume: 16 });
}
