

import { sleep } from "../../utils/sleep.js";

export async function Gripstone(cause, entity) {
    try {
        if (entity.typeId === 'lv_mo:gripstone') {
            entity.addEffect('levitation', (1 * 20), { amplifier: 50, showParticles: false });
            entity.addEffect('invisibility', (1 * 20), { amplifier: 1, showParticles: false });
            await sleep(25)
            if (entity.dimension.getBlock(entity.location).above(1).isAir) {
                entity.remove()
                entity.triggerEvent(`behavior`)
            }
        } 
    } catch (error) {}
}
