//------------------------------------------------------------------------------------------------------------------------------------------------
// PA2 Extras - Extra Recipes
//------------------------------------------------------------------------------------------------------------------------------------------------
// Author: RicTheCoder
//
// A script that adds extra recipes with the ability to turn them on and off, just set the property 'enable' to false and the recipe won't
// be registered.
//
// Recipes have a simplified way of being created, so no need to provide a specific pattern for shaped recipes, it will be assumed.
//
// When using the advance recipes to add custom ones, all required fields need to be provided.
//------------------------------------------------------------------------------------------------------------------------------------------------

// Shaped Recipes
// - 'output' is required, the item to output, follows the normal kubejs rules
// - 'inputs' is required, the input items to make the recipe, follows the normal kubejs rules
// - 'enable' is required, if true the recipe will register, if false it will not
//
// The patterns are assumed from the input items, just set an item to "" to ignore the slot
const shapedRecipes = [
	{
		// Infinity Pipe Upgrade (With all creative things this made sense, and it is not that overpowered due to the way the recipe is)
		// - 4x Final Star Shards
		// - 2x Fading Matter Blocks
		// - 2x Magnum Omega Star
		// - 1x Ultimate Pipe Upgrade
		output: "pipez:infinity_upgrade",
		inputs: [
			"projectexpansion:final_star_shard", "projectexpansion:magnum_star_omega", "projectexpansion:final_star_shard",
			"projectexpansion:fading_matter_block", "pipez:ultimate_upgrade", "projectexpansion:fading_matter_block",
			"projectexpansion:final_star_shard", "projectexpansion:magnum_star_omega", "projectexpansion:final_star_shard"
		],
		enable: true
	},
	{
		// Max Storage Upgrade (With all creative things this also made sense, and it is not that overpowered due to the way the recipe is)
		// - 4x Final Star Shards
		// - 2x Fading Matter Blocks
		// - 2x Magnum Omega Star
		// - 1x Netherite Upgrade
		output: "functionalstorage:max_storage_upgrade",
		inputs: [
			"projectexpansion:final_star_shard", "projectexpansion:magnum_star_omega", "projectexpansion:final_star_shard",
			"projectexpansion:fading_matter_block", "functionalstorage:netherite_upgrade", "projectexpansion:fading_matter_block",
			"projectexpansion:final_star_shard", "projectexpansion:magnum_star_omega", "projectexpansion:final_star_shard"
		],
		enable: true
	},
	{
		// Creative Bin
		// - 4x Final Star Shards
		// - 2x Fading Matter Blocks
		// - 2x Magnum Omega Star
		// - 1x Netherite Upgrade
		output: "mekanism:creative_bin",
		inputs: [
			"projectexpansion:final_star", "projectexpansion:fading_matter_block", "projectexpansion:final_star",
			"projectexpansion:fading_matter_block", "functionalstorage:creative_vending_upgrade", "projectexpansion:fading_matter_block",
			"projectexpansion:final_star", "projectexpansion:fading_matter_block", "projectexpansion:final_star"
		],
		enable: true
	}
];

// Shapeless Recipes
// - Same as above
const shapelessRecipes = [
	{
        output: "refinedstorage:creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/light_blue"],
        enable: true
    },
    {
        output: "refinedstorage:light_gray_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/light_gray"],
        enable: true
    },
    {
        output: "refinedstorage:lime_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/lime"],
        enable: true
    },
    {
        output: "refinedstorage:magenta_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/magenta"],
        enable: true
    },
    {
        output: "refinedstorage:orange_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/orange"],
        enable: true
    },
    {
        output: "refinedstorage:pink_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/pink"],
        enable: true
    },
    {
        output: "refinedstorage:purple_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/purple"],
        enable: true
    },
    {
        output: "refinedstorage:red_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/red"],
        enable: true
    },
    {
        output: "refinedstorage:white_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/white"],
        enable: true
    },
    {
        output: "refinedstorage:yellow_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/yellow"],
        enable: true
    },
    {
        output: "refinedstorage:gray_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/gray"],
        enable: true
    },
    {
        output: "refinedstorage:cyan_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/cyan"],
        enable: true
    },
    {
        output: "refinedstorage:blue_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/blue"],
        enable: true
    },
    {
        output: "refinedstorage:brown_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/brown"],
        enable: true
    },
    {
        output: "refinedstorage:green_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/green"],
        enable: true
    },
    {
        output: "refinedstorage:black_creative_controller",
        inputs: ["#refinedstorage:creative_controller", "#forge:dyes/black"],
        enable: true
    },
	{
		// Firework Fix
		output: Item.of("minecraft:firework_rocket", 6, {Fireworks: {Flight: 1}}),
		inputs: ["minecraft:paper", "minecraft:paper", "minecraft:gunpowder", "minecraft:gunpowder"],
		enable: true
	},
	{
		// Firework Fix 2
		output: Item.of("minecraft:firework_rocket", 6, {Fireworks: {Flight: 2}}),
		inputs: ["minecraft:paper", "minecraft:paper", "minecraft:gunpowder", "minecraft:gunpowder", "minecraft:gunpowder", "minecraft:gunpowder"],
		enable: true
	},
	{
		// Firework Fix 3
		output: Item.of("minecraft:firework_rocket", 6, {Fireworks: {Flight: 3}}),
		inputs: ["minecraft:paper", "minecraft:paper", "minecraft:gunpowder", "minecraft:gunpowder", "minecraft:gunpowder", "minecraft:gunpowder", 
				 "minecraft:gunpowder", "minecraft:gunpowder"],
		enable: true
	}
]

// Blasting Recipes
// - 'output' is required, the item id for the output
// - 'input' is required, the item id for the input
// - 'enable' is required, if true the recipe will register, if false it will not
const blastingRecipes = [
	{
		input: "draconicevolution:awakened_draconium_dust",
		output: "draconicevolution:awakened_draconium_ingot",
		enable: true
	},
	{
		input: "draconicevolution:draconium_dust",
		output: "draconicevolution:draconium_ingot",
		enable: true
	}
]

// Stonecutting Recipes
// - 'outputs' is required, the item ids for the outputs
// - 'input' is required, the item id for the input
// - 'enable' is required, if true the recipe will register, if false it will not
// - 'exclude' is optional, items/tags in the list will be removed from the final added recipes
const stonecutRecipes = [
	{
		input: "#chisel_chipped_integration:factory_block",
		outputs: ["#chisel_chipped_integration:factory_block"],
		enable: true
	},
	{
		input: "#chisel_chipped_integration:laboratory_block",
		outputs: ["#chisel_chipped_integration:laboratory_block"],
		enable: true
	},
	{
		input: "#chisel_chipped_integration:technical_block",
		outputs: ["#chisel_chipped_integration:technical_block"],
		enable: true
	},
	{
		input: "#chisel_chipped_integration:tyrian",
		outputs: ["#chisel_chipped_integration:tyrian"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/bronze",
		outputs: ["#forge:storage_blocks/bronze"],
		exclude: ["mekanism:block_bronze"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/copper",
		outputs: ["#forge:storage_blocks/copper"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/electrum",
		outputs: ["#forge:storage_blocks/electrumu"],
		enable: true
	},
	{
		input: "#chipped:gold_block",
		outputs: ["#chipped:gold_block"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/invar",
		outputs: ["#forge:storage_blocks/invar"],
		enable: true
	},
	{
		input: "#chipped:iron_block",
		outputs: ["#chipped:iron_block"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/lead",
		outputs: ["#forge:storage_blocks/lead"],
		exclude: ["mekanism:block_lead"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/nickel",
		outputs: ["#forge:storage_blocks/nickel"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/silver",
		outputs: ["#forge:storage_blocks/silver"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/steel",
		outputs: ["#forge:storage_blocks/steel"],
		exclude: ["mekanism:block_steel"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/tin",
		outputs: ["#forge:storage_blocks/tin"],
		exclude: ["mekanism:block_tin"],
		enable: true
	},
	{
		input: "#forge:storage_blocks/uranium",
		outputs: ["#forge:storage_blocks/uranium"],
		exclude: ["mekanism:block_uranium"],
		enable: true
	},
	{
		input: "#chipped:black_wool",
		outputs: ["#chipped:black_wool"],
		enable: true
	},
	{
		input: "#chipped:blue_wool",
		outputs: ["#chipped:blue_wool"],
		enable: true
	},
	{
		input: "#chipped:brown_wool",
		outputs: ["#chipped:brown_wool"],
		enable: true
	},
	{
		input: "#chipped:cyan_wool",
		outputs: ["#chipped:cyan_wool"],
		enable: true
	},
	{
		input: "#chipped:gray_wool",
		outputs: ["#chipped:gray_wool"],
		enable: true
	},
	{
		input: "#chipped:green_wool",
		outputs: ["#chipped:green_wool"],
		enable: true
	},
	{
        input: "#chipped:light_blue_wool",
        outputs: ["#chipped:light_blue_wool"],
        enable: true
    },
    {
        input: "#chipped:light_gray_wool",
        outputs: ["#chipped:light_gray_wool"],
        enable: true
    },
    {
        input: "#chipped:lime_wool",
        outputs: ["#chipped:lime_wool"],
        enable: true
    },
    {
        input: "#chipped:magenta_wool",
        outputs: ["#chipped:magenta_wool"],
        enable: true
    },
    {
        input: "#chipped:orange_wool",
        outputs: ["#chipped:orange_wool"],
        enable: true
    },
    {
        input: "#chipped:pink_wool",
        outputs: ["#chipped:pink_wool"],
        enable: true
    },
    {
        input: "#chipped:purple_wool",
        outputs: ["#chipped:purple_wool"],
        enable: true
    },
    {
        input: "#chipped:red_wool",
        outputs: ["#chipped:red_wool"],
        enable: true
    },
    {
        input: "#chipped:white_wool",
        outputs: ["#chipped:white_wool"],
        enable: true
    },
    {
        input: "#chipped:yellow_wool",
        outputs: ["#chipped:yellow_wool"],
        enable: true
    },
	{
        input: "#chipped:black_carpet",
        outputs: ["#chipped:black_carpet"],
        enable: true
    },
    {
        input: "#chipped:blue_carpet",
        outputs: ["#chipped:blue_carpet"],
        enable: true
    },
    {
        input: "#chipped:brown_carpet",
        outputs: ["#chipped:brown_carpet"],
        enable: true
    },
    {
        input: "#chipped:cyan_carpet",
        outputs: ["#chipped:cyan_carpet"],
        enable: true
    },
    {
        input: "#chipped:gray_carpet",
        outputs: ["#chipped:gray_carpet"],
        enable: true
    },
    {
        input: "#chipped:green_carpet",
        outputs: ["#chipped:green_carpet"],
        enable: true
    },
    {
        input: "#chipped:light_blue_carpet",
        outputs: ["#chipped:light_blue_carpet"],
        enable: true
    },
    {
        input: "#chipped:light_gray_carpet",
        outputs: ["#chipped:light_gray_carpet"],
        enable: true
    },
    {
        input: "#chipped:lime_carpet",
        outputs: ["#chipped:lime_carpet"],
        enable: true
    },
    {
        input: "#chipped:magenta_carpet",
        outputs: ["#chipped:magenta_carpet"],
        enable: true
    },
    {
        input: "#chipped:orange_carpet",
        outputs: ["#chipped:orange_carpet"],
        enable: true
    },
    {
        input: "#chipped:pink_carpet",
        outputs: ["#chipped:pink_carpet"],
        enable: true
    },
    {
        input: "#chipped:purple_carpet",
        outputs: ["#chipped:purple_carpet"],
        enable: true
    },
    {
        input: "#chipped:red_carpet",
        outputs: ["#chipped:red_carpet"],
        enable: true
    },
    {
        input: "#chipped:white_carpet",
        outputs: ["#chipped:white_carpet"],
        enable: true
    },
    {
        input: "#chipped:yellow_carpet",
        outputs: ["#chipped:yellow_carpet"],
        enable: true
    }
]

// Advanced Recipes
// - This will use the 'custom' recipe builder from kubejs, check the documention of kubejs for more info on it.
// - Has the 'enable' field for the same reason as the rest
const advRecipes = [
	// Anti-Lag Alternatives 
	// - To the In-World transformation, but make it balanced so that In-World is still more favourable
	// - Uses Dissolution Chamber from Industrial Foregoing because it seemed to be the more logical one
	// - Only makes alternatives for the more used ones, Final Star Shard and similar will stay as is
	{
		// Redstone Crytal (outputs only 1)
		// - 1B of Water
		// - 2x Redstone Blocks
		// - 2x Fluix Dust
		// - 2x Sky Stone Dust
		// - 2x Charged Certus Quartz Crystal
		type: "industrialforegoing:dissolution_chamber",
		output: { item: "appflux:redstone_crystal", count: 1 },
		processingTime: 300,
		inputFluid: "{FluidName:\"minecraft:water\",Amount:1000}",
		input: [
			{ item: "minecraft:redstone_block" },
			{ item: "minecraft:redstone_block" },
			{ item: "ae2:fluix_dust" },
			{ item: "ae2:fluix_dust" },
			{ item: "ae2:sky_dust" },
			{ item: "ae2:sky_dust" },
			{ item: "ae2:charged_certus_quartz_crystal" },
			{ item: "ae2:charged_certus_quartz_crystal" }
		],
		enable: true
	},
	{
		// Sky Steel Ingot (outputs 2)
		// - 1B of Lava
		// - 3x Iron Ingot
		// - 3x Sky Stone Block
		// - 2x Charged Certus Quartz Crystal
		type: "industrialforegoing:dissolution_chamber",
		output: { item: "megacells:sky_steel_ingot", count: 1 },
		processingTime: 400,
		inputFluid: "{FluidName:\"minecraft:lava\",Amount:1000}",
		input: [
			{ item: "minecraft:iron_ingot" },
			{ item: "minecraft:iron_ingot" },
			{ item: "minecraft:iron_ingot" },
			{ item: "ae2:sky_stone_block" },
			{ item: "ae2:sky_stone_block" },
			{ item: "ae2:sky_stone_block" },
			{ item: "ae2:charged_certus_quartz_crystal" },
			{ item: "ae2:charged_certus_quartz_crystal" }
		],
		enable: true
	},
	{
		// Spent Nuclear Waste - Use 1 (as a sort of dupe for Plutonium Pellet)
		// - 2B of Spent Nuclear Waste
		// - 1.5B of Liquid Uranium Oxide
		// - 1x Plutonium Pellet
		// - 1000 Ticks
		//
		// Has an extra 500mb of "reactivated" nuclear waste
		type: "mekanism:reaction",
		duration: 1000,
		fluidInput: {
			amount: 1500,
			fluid: "mekanism:uranium_oxide"
		},
		gasInput: {
			amount: 2000,
			gas: "mekanism:spent_nuclear_waste"
		},
		itemInput: {
			ingredient: { item: "mekanism:pellet_plutonium" }
		},
		itemOutput: { item: "mekanism:pellet_plutonium", count: 2 },
		gasOutput: {
			amount: 500,
			gas: "mekanism:nuclear_waste"
		},
		enable: true
	},
	{
		// Spent Nuclear Waste - Use 2 (as a sort of dupe for Polonium Pellet)
		// - 2B of Spent Nuclear Waste
		// - 1.5B of Liquid Uranium Oxide
		// - 1x Polonium Pellet
		// - 1000 Ticks
		//
		// Has an extra 500mb of "reactivated" nuclear waste
		type: "mekanism:reaction",
		duration: 1000,
		fluidInput: {
			amount: 1500,
			fluid: "mekanism:uranium_oxide"
		},
		gasInput: {
			amount: 2000,
			gas: "mekanism:spent_nuclear_waste"
		},
		itemInput: {
			ingredient: { item: "mekanism:pellet_polonium" }
		},
		itemOutput: { item: "mekanism:pellet_polonium", count: 2 },
		gasOutput: {
			amount: 500,
			gas: "mekanism:nuclear_waste"
		},
		enable: true
	},
	{
		// Infused Archiveau
		// - 50/50 Eterna
		// - 67/68 Quanta
		// - 55/57 Arcana
		// - 1x Archiveau
		type: "apotheosis:keep_nbt_enchanting",
		conditions: [
			{
				type: "apotheosis:module",
				module: "enchantment"
			}
		],
		input: { item: "kubejs:archiveau" },
		requirements: {
			eterna: 50,
			quanta: 67,
			arcana: 55
		},
		max_requirements: {
			eterna: 50,
			quanta: 68,
			arcana: 57
		},
		result: { item: "pa2_extras:inf_archiveau", count: 1 },
		enable: true
	},
	{
		// Creative Controller for RS (mimics AE2 Creative Cell)
		// - 1x Final Star
		// - 5x Controller (default color)
		type: "powah:energizing",
		ingredients: [
			{ item: "projectexpansion:final_star" },
			{ item: "refinedstorage:controller" },
			{ item: "refinedstorage:controller" },
			{ item: "refinedstorage:controller" },
			{ item: "refinedstorage:controller" },
			{ item: "refinedstorage:controller" }
		],
		energy: 2147483646,
		result: { item: "refinedstorage:creative_controller" },
		enable: true
	},
	{
		// Royal Jelly to Source
		// - 1B = 4000 Source
		type: "starbunclemania:fluid_sourcelink",
		fluid: "the_bumblezone:royal_jelly_fluid_still",
		mb_to_source_ratio: 5.0,
		enable: true
	},
	{
		// Ether Gas to Source
		// - 1B = 2500 Source
		type: "starbunclemania:fluid_sourcelink",
		fluid: "industrialforegoing:ether_gas",
		mb_to_source_ratio: 2.5,
		enable: true
	},
	{
		// Pink Slime to Source
		// - 1B = 600 Source
		type: "starbunclemania:fluid_sourcelink",
		fluid: "industrialforegoing:pink_slime",
		mb_to_source_ratio: 0.6,
		enable: true
	},
	{
		// Add Archilution as a Pulverizer Catalyst
		// - Primary Mod: 5.0
		// - Secondary Mod: 10.0
		// - Energy Mod: 0.5
		// - Min Chance: 0.5
		// - Use Chance: 1.0
		type: "thermal:pulverizer_catalyst",
		ingredient: { item: "kubejs:archilution" },
		primary_mod: 5.0,
		secondary_mod: 10.0,
		energy_mod: 0.5,
		min_chance: 0.5,
		use_change: 1.0,
		enable: true
	},
	{
		// Add Archilution as a Induction Smelter Catalyst
		// - Primary Mod: 7.0
		// - Secondary Mod: 7.0
		// - Energy Mod: 1.5
		// - Min Chance: 0.5
		// - Use Chance: 1.0
		type: "thermal:smelter_catalyst",
		ingredient: { item: "kubejs:archilution" },
		primary_mod: 7.0,
		secondary_mod: 7.0,
		energy_mod: 1.5,
		min_chance: 0.5,
		use_change: 1.0,
		enable: true
	},
	{
		// Add Archimet as an Insolator Catalyst
		// - Primary Mod: 5.0
		// - Secondary Mod: 5.0
		// - Energy Modifier: 0.9
		// - Min Chance: 0.5
		// - Use Chance: 1.0
		type: "thermal:insolator_catalyst",
		ingredient: { item: "kubejs:archimeat" },
		primary_mod: 5.0,
		secondary_mod: 5.0,
		energy_mod: 0.9,
		min_chance: 0.5,
		use_change: 1.0,
		enable: true
	},
	{
		// Thermal Latex + Water = IF Latex
		// - 100mb of Thermal Latex (Dirty Latex)
		//
		// Result:
		// - 25mb of IF Latex
		// - 75mb of Tree Oil
		type: "thermal:refinery",
		ingredient: { fluid: "thermal:latex", amount: 100 },
		result: [
			{ fluid: "industrialforegoing:latex", amount: 25 },
			{ fluid: "thermal:tree_oil", amount: 75 }
		],
		energy: 8000,
		experience: 0,
		enable: true
	},
	{
		// Fixes the Adamantine Knife recipe (found it broken going through logs)
		type: "minecraft:smithing_transform",
		template: { item: "enlightened_end:adamantite_smithing_template" },
		base: { item: "farmersdelight:iron_knife" },
		addition: { item: "enlightened_end:adamantite_ingot" },
		result: { item: "enlightened_end:adamantite_knife", count: 1 },
		enable: true
	}
]

// Replaces inputs on recipes
// - Key is the item to be replaced, value the item to replace with
const inputReplacer =  {
	"cyclic:compressed_cobblestone": "allthecompressed:cobblestone_1x"
}

// Adds a recipe to turn a block with saved NBT into the original recipe one (for stacking)
// - Items will generate a shapeless recipe that takes the block and returns a no NBT one
const nbtVoider = [
	"draconicevolution:basic_crafting_injector",
	"draconicevolution:wyvern_crafting_injector",
	"draconicevolution:awakened_crafting_injector",
	"draconicevolution:chaotic_crafting_injector"
]

//---[CODE]---------------------------------------------------------------------------------------------------------------------------------------

// Simple recipe registration
ServerEvents.recipes(event => {
	// Applies Shapeless recipes
	shapelessRecipes.forEach(recipe => {
		if (recipe.enable)
		{
			event.shapeless(recipe.output, recipe.inputs);
		}
	});
	
	// Applies Shaped Recipes
	shapedRecipes.forEach(recipe => {
		if (recipe.enable)
		{		
			event.shaped(recipe.output, ["012", "345", "678"], {
				"0": recipe.inputs[0],
				"1": recipe.inputs[1],
				"2": recipe.inputs[2],
				"3": recipe.inputs[3],
				"4": recipe.inputs[4],
				"5": recipe.inputs[5],
				"6": recipe.inputs[6],
				"7": recipe.inputs[7],
				"8": recipe.inputs[8],
			});
		}
	});
	
	// Applies blasting recipes
	blastingRecipes.forEach(recipe => {
		if (recipe.enable)
		{
			event.blasting(recipe.output, recipe.input);
		}
	});
	
	// Applies stonecutting recipes
	stonecutRecipes.forEach(recipe => {
		if (recipe.enable)
		{
			recipe.outputs.forEach(out => {
				Ingredient.of(out).getItemIds().forEach(id => {
					if (recipe.exclude && recipe.exclude.includes(id))
						return;
					
					event.stonecutting(id, recipe.input);
				});
			});
		}
	});
	
	// Applies Custom Recipes
	advRecipes.forEach(recipe => {
		if (recipe.enable)
			event.custom(recipe);
	});
	
	// Applies replacements
	Object.keys(inputReplacer).forEach(origin => {
		event.replaceInput({ input: origin }, origin, inputReplacer[origin]);
	});
	
	// Applies NBT voider
	nbtVoider.forEach(item => {
		event.shapeless(Item.of(item, 1), item);
	});
	
	// Generate Recipes for the Compressed blocks
	global.compressedBlocks.forEach(entry => {
		let baseId = entry.base.replace(/.+:(.+)/, "pa2_compressed:$1");
		
		for (let i = 1; i <= 9; i++)
		{
			event.shaped(baseId + `_${i}x`, ["###", "###", "###"], {
				"#": i === 1 ? entry.base : baseId + `_${i-1}x`
			});
			
			event.shapeless(Item.of(i === 1 ? entry.base : baseId + `_${i-1}x`, 9), [baseId + `_${i}x`]);
		}
	});
});