ForgeEvents.onEvent('net.minecraftforge.event.level.BlockEvent$NeighborNotifyEvent', event => {
    let block = event.state.block
    if (block.id !== 'minecraft:lava') return;
    for (let dir of event.notifiedSides) {
        const pos = event.pos.relative(dir);
        const target = event.level.getBlockState(pos);
        if (target.is('kubejs:soggy_carpet')) {
            event.level.setBlock(pos, Block.getBlock('kubejs:carpet').defaultBlockState(), 3);
            doCommandForBlock(event.level.server, `/execute positioned ${pos.x} ${pos.y} ${pos.z} run playsound minecraft:block.lava.pop block @a ~ ~ ~ 0.5 0.75`)
            break;
        }
    }
});