// kubejs/server_scripts/strange_aeons_vampirism_gates.js
// Gate vampire progression, not initial infection.

ServerEvents.recipes(event => {
  const PETAL = '#botania:petals'

  // Verify these IDs with JEI or /kubejs hand.
  const ALTAR_INSPIRATION = 'vampirism:altar_inspiration'
  const ALTAR_INFUSION = 'vampirism:altar_infusion'
  const ALTAR_PILLAR = 'vampirism:altar_pillar'
  const ALTAR_TIP = 'vampirism:altar_tip'

  event.remove({ output: ALTAR_INSPIRATION })
  event.remove({ output: ALTAR_INFUSION })
  event.remove({ output: ALTAR_PILLAR })
  event.remove({ output: ALTAR_TIP })

  // Levels 2-4: requires recovered living magic from Twilight/Botania.
  event.shaped(ALTAR_INSPIRATION, [
    'RPR',
    'GBG',
    'SCS'
  ], {
    R: 'minecraft:redstone',
    P: PETAL,
    G: 'minecraft:gold_ingot',
    B: 'minecraft:glass_bottle',
    S: 'minecraft:stone_bricks',
    C: 'minecraft:crying_obsidian'
  }).id('strange_aeons:vampirism/altar_inspiration_twilight_gated')

  // Levels 5+: requires a later, darker threshold.
  // Start with a Dimensional Doors gate because it fits the "world wound" theme.
  // Replace this item if your Dimensional Doors item ID differs.
  event.shaped(ALTAR_INFUSION, [
    'OEO',
    'DND',
    'OEO'
  ], {
    O: 'minecraft:obsidian',
    E: 'minecraft:ender_eye',
    D: 'dimdoors:world_thread',
    N: 'minecraft:nether_star'
  }).id('strange_aeons:vampirism/altar_infusion_world_thread_gated')

  // Supporting multiblock pieces also require the same broad era.
  event.shaped(Item.of(ALTAR_PILLAR, 2), [
    'SDS',
    'SPS',
    'SDS'
  ], {
    S: 'minecraft:stone_bricks',
    D: 'dimdoors:world_thread',
    P: PETAL
  }).id('strange_aeons:vampirism/altar_pillar_gated')

  event.shaped(Item.of(ALTAR_TIP, 2), [
    ' G ',
    'GPG',
    'SDS'
  ], {
    G: 'minecraft:gold_ingot',
    P: PETAL,
    S: 'minecraft:stone_bricks',
    D: 'dimdoors:world_thread'
  }).id('strange_aeons:vampirism/altar_tip_gated')
})