ServerEvents.recipes(event => {
  event.recipes.summoningrituals
    .altar('minecraft:iron_ingot')
    .id('kubejs:summoning/colossus')

    .input('4x minecraft:stick')
    .input('16x minecraft:cobblestone')
    .input('#minecraft:small_flowers')

    .itemOutput(
      SummoningOutput.item(
        Item.of('minecraft:iron_ingot')
          .withName('Iron Colossus')
      )
    )

    .recipeTime(100)
    .dayTime('day')
})

SummoningRituals.complete(event => {
  const id = String(event.recipe.getId())
  if (id !== 'kubejs:summoning/colossus') return

  let x, y, z
  if (event.pos) {
    x = event.pos.x
    y = event.pos.y
    z = event.pos.z
  } else if (event.block) {
    x = event.block.x
    y = event.block.y
    z = event.block.z
  } else return

  // Mob spawnen
  event.server.runCommandSilent(
    `summon armageddon_mod:the_iron_colossus ${x} ${y + 1} ${z}`
  )

  // NUR das benannte Ritual-Item löschen
  event.server.runCommandSilent(
    `kill @e[type=item,x=${x},y=${y},z=${z},distance=..3,nbt={Item:{id:"minecraft:iron_ingot"}}]`
  )
})
