import { BlockPermutation } from '@minecraft/server';

export function onTick(event) {
    const { block, dimension } = event;
    const blockBelow = block.below();
    if (blockBelow.type.id === 'minecraft:air') {
        blockBelow.setPermutation(BlockPermutation.resolve('minecraft:sand'));
    }
}

const gritstone = {
    onTick: onTick
};

export default gritstone