// This is just to tweak some Sophisticated Storage Recipes to accept recipe changes

const $ShapedRecipeSchema = Java.loadClass(
  "dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapedRecipeSchema"
);

const $ShapelessRecipeSchema = Java.loadClass(
  "dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapelessRecipeSchema"
);

const $SmithingRecipeSchema = Java.loadClass(
  "dev.latvian.mods.kubejs.recipe.schema.minecraft.SmithingTransformRecipeSchema"
);

StartupEvents.recipeSchemaRegistry((event) => {
  event.register(
    "sophisticatedcore:upgrade_next_tier",
    $ShapedRecipeSchema.SCHEMA
  );

  event.register(
    "sophisticatedstorage:storage_tier_upgrade",
    $ShapedRecipeSchema.SCHEMA
  );

  event.register(
    "sophisticatedstorage:storage_tier_upgrade_shapeless",
    $ShapelessRecipeSchema.SCHEMA
  );

  event.register(
    "sophisticatedbackpacks:backpack_upgrade",
    $ShapedRecipeSchema.SCHEMA
  );

  event.register(
    "sophisticatedbackpacks:smithing_backpack_upgrade",
    $SmithingRecipeSchema.SCHEMA
  );
});
