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:pool_tiles')) {
            event.level.setBlock(pos, Block.getBlock('kubejs:pool_tiles_cracked').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;
        }
    }
});
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:missing_tiles_half')) {
            event.level.setBlock(pos, Block.getBlock('kubejs:missing_tiles_half_cracked').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;
        }
    }
});

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:pool_tiles_wet')) {
            event.level.setBlock(pos, Block.getBlock('kubejs:pool_tiles_cracked').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;
        }
    }
});
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:missing_tiles_half_wet')) {
            event.level.setBlock(pos, Block.getBlock('kubejs:missing_tiles_half_cracked').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;
        }
    }
});

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:pool_tiles_cracked_wet')) {
            event.level.setBlock(pos, Block.getBlock('kubejs:pool_tiles_cracked').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;
        }
    }
});
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:missing_tiles_half_cracked_wet')) {
            event.level.setBlock(pos, Block.getBlock('kubejs:missing_tiles_half_cracked').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;
        }
    }
});