onEvent("recipes", event => {
  event.remove({output: 'cyclic:workbench'})
  event.shaped('cyclic:workbench', [
    'CC',
    'CC'
  ], {
    C: 'minecraft:cobblestone'
  })

  event.remove({output: 'cb_microblock:stone_rod'})
  event.shaped('4x cb_microblock:stone_rod', [
    'C',
    'C'
  ], {
    C: 'minecraft:cobblestone'
  })

  event.shaped(Item.of('exnihilosequentia:hammer_stone', '{Damage:0}'), [
    ' C ',
    ' RC',
    'R  '
  ], {
    C: 'minecraft:cobblestone',
    R: 'cb_microblock:stone_rod'
  })
})

onEvent('block.right_click', event => {
  const { block, hand, item, world, player } = event;
  if (hand.name() != 'MAIN_HAND') return;

  if (item.toString() == 'Item.empty' && player.isCrouching() && block.equals('minecraft:stone')) {
      const entity = world.createEntity('item');
      entity.item = 'exnihilosequentia:pebble_stone';
      entity.setPosition(block.pos.x + 0.5, block.pos.y + 0.5, block.pos.z + 0.5);
      entity.spawn();
  }
});