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

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