<commit_before>package teamOD.armourReborn.common.crafting;

import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import teamOD.armourReborn.common.block.ModBlocks;
import teamOD.armourReborn.common.fluids.FluidMod;
import teamOD.armourReborn.common.fluids.ModFluids;
import teamOD.armourReborn.common.item.ModItems;
import teamOD.armourReborn.common.item.equipment.ItemModArmour;
import teamOD.armourReborn.common.lib.LibItemStats;
import teamOD.armourReborn.common.lib.LibMisc;
import teamOD.armourReborn.common.lib.LibUtil;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

public final class ModCraftingRecipes {
	
	private static final ImmutableList <String> preffixes = ImmutableList.of ("ingot", "block", "ore") ;
	
	private static Map <String, FluidStack> meltingRecipes = Maps.newHashMap() ;
	private static Map <Integer, String> oreIDs = Maps.newHashMap() ;
	private static Map <FluidMod, ItemStack[]> castingRecipes = Maps.newHashMap() ;
	private static Map <Item, List<Object>> ModRecipes = Maps.newHashMap() ;
	
	public static List <AlloyRecipes> alloyRecipes = Lists.newLinkedList() ;
	
	public static void init () {
		addMeltingRecipes () ;
		addForgeRecipes () ;
		addCastingRecipes () ;
		addAlloyRecipes () ;
		addArmourRecipes () ;
	}
	
	private static void addCastingRecipes () {
		registerCastingRecipe (ModFluids.gold,
				new ItemStack (Items.gold_ingot, 1, 0)
				) ;
		
		registerCastingRecipe (ModFluids.steel, 
				new ItemStack (ModItems.MATERIALS, 1, 0)
				) ;
		
		registerCastingRecipe (ModFluids.aluminium, 
				new ItemStack (ModItems.MATERIALS, 1, 1)
				) ;
		
		registerCastingRecipe (ModFluids.copper, 
				new ItemStack (ModItems.MATERIALS, 1, 2)
				) ;
		
		registerCastingRecipe (ModFluids.iron, 
				new ItemStack(Items.iron_ingot, 1, 0), 
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.HEAD), 5, 0),
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.CHEST), 8, 0),
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.LEGS), 7, 0),
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.FEET), 4, 0)
				) ;	
		
		registerCastingRecipe (ModFluids.aluAlloy, 
				new ItemStack (ModItems.MATERIALS, 1, 3), 
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.HEAD), 5, 0),
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.CHEST), 8, 0),
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.LEGS), 7, 0),
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.FEET), 4, 0)
				) ;	
		
		registerCastingRecipe (ModFluids.steel, 
				new ItemStack (ModItems.MATERIALS, 1, 0), 
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.HEAD), 5, 0),
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.CHEST), 8, 0),
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.LEGS), 7, 0),
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.FEET), 4, 0)
				) ;	
		
	}
	
	
	private static void addAlloyRecipes () {
		registerAlloyRecipe (new FluidStack (ModFluids.steel, 1), new FluidStack (ModFluids.iron, 2), new FluidStack (ModFluids.coal, 1)) ;
	}
	
	private static void addForgeRecipes () {
		addOreDictRecipe(new ItemStack(ModBlocks.forgeBlocks,5,0),
				"III", 
				"I I", 
				"III", 
				'I', "ingotIron");
		
		addOreDictRecipe(new ItemStack(ModBlocks.forgeAnvil,1,0),
				"   ",
				" B ",
				"III",
				'B', "blockIron",
				'I', "ingotIron");
		
		addOreDictRecipe(new ItemStack(ModBlocks.forgeHeater,1,0),
				"III",
				"IBI",
				"III",
				'B', new ItemStack(Items.bucket),
				'I', "ingotIron");
		
		addOreDictRecipe(new ItemStack(ModBlocks.forgeMaster,1,0),
				"III",
				"IRI",
				"III",
				'R', "dustRedstone",
				'I', "ingotIron");
	}
	
	private static void addMeltingRecipes () {
		
		addMeltingRecipe ("Iron", ModFluids.iron) ;
		addMeltingRecipe ("Steel", ModFluids.steel) ;
		addMeltingRecipe ("Aluminium", ModFluids.aluminium) ;
		addMeltingRecipe ("Copper", ModFluids.copper) ;
		addMeltingRecipe ("Gold", ModFluids.gold) ;
		addMeltingRecipe ("Coal", ModFluids.coal) ;
	}
	
	private static void addArmourRecipes () {
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.HEAD)),
				"LLL", 
				"I I", 
				"   ", 
				'I', "ingotIron",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.CHEST)),
				"L L", 
				"LIL", 
				"III", 
				'I', "ingotIron",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.LEGS)),
				"LLL", 
				"I I", 
				"I I", 
				'I', "ingotIron",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.FEET)),
				"   ", 
				"I I", 
				"L L", 
				'I', "ingotIron",
				'L', "leather");
	}
	
	private static void addMeltingRecipe (String material, Fluid output) {

		for (String suffix: preffixes) {
			meltingRecipes.put (suffix + material, new FluidStack (output, LibItemStats.getValue(suffix)) ) ;
			oreIDs.put (OreDictionary.getOreID(suffix + material), suffix + material) ;
		}
	}
	
	public static FluidStack findRecipe (ItemStack item) {<commit_msg>Crafting for all leather armour variants complete<commit_after>package teamOD.armourReborn.common.crafting;

import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import teamOD.armourReborn.common.block.ModBlocks;
import teamOD.armourReborn.common.fluids.FluidMod;
import teamOD.armourReborn.common.fluids.ModFluids;
import teamOD.armourReborn.common.item.ModItems;
import teamOD.armourReborn.common.item.equipment.ItemModArmour;
import teamOD.armourReborn.common.lib.LibItemStats;
import teamOD.armourReborn.common.lib.LibMisc;
import teamOD.armourReborn.common.lib.LibUtil;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

public final class ModCraftingRecipes {
	
	private static final ImmutableList <String> preffixes = ImmutableList.of ("ingot", "block", "ore") ;
	
	private static Map <String, FluidStack> meltingRecipes = Maps.newHashMap() ;
	private static Map <Integer, String> oreIDs = Maps.newHashMap() ;
	private static Map <FluidMod, ItemStack[]> castingRecipes = Maps.newHashMap() ;
	private static Map <Item, List<Object>> ModRecipes = Maps.newHashMap() ;
	
	public static List <AlloyRecipes> alloyRecipes = Lists.newLinkedList() ;
	
	public static void init () {
		addMeltingRecipes () ;
		addForgeRecipes () ;
		addCastingRecipes () ;
		addAlloyRecipes () ;
		addArmourRecipes () ;
	}
	
	private static void addCastingRecipes () {
		registerCastingRecipe (ModFluids.gold,
				new ItemStack (Items.gold_ingot, 1, 0)
				) ;
		
		registerCastingRecipe (ModFluids.steel, 
				new ItemStack (ModItems.MATERIALS, 1, 0)
				) ;
		
		registerCastingRecipe (ModFluids.aluminium, 
				new ItemStack (ModItems.MATERIALS, 1, 1)
				) ;
		
		registerCastingRecipe (ModFluids.copper, 
				new ItemStack (ModItems.MATERIALS, 1, 2)
				) ;
		
		registerCastingRecipe (ModFluids.iron, 
				new ItemStack(Items.iron_ingot, 1, 0), 
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.HEAD), 5, 0),
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.CHEST), 8, 0),
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.LEGS), 7, 0),
				new ItemStack(ModItems.getArmourByName("ironplate").get(EntityEquipmentSlot.FEET), 4, 0)
				) ;	
		
		registerCastingRecipe (ModFluids.aluAlloy, 
				new ItemStack (ModItems.MATERIALS, 1, 3), 
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.HEAD), 5, 0),
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.CHEST), 8, 0),
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.LEGS), 7, 0),
				new ItemStack(ModItems.getArmourByName("aluminiumplate").get(EntityEquipmentSlot.FEET), 4, 0)
				) ;	
		
		registerCastingRecipe (ModFluids.steel, 
				new ItemStack (ModItems.MATERIALS, 1, 0), 
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.HEAD), 5, 0),
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.CHEST), 8, 0),
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.LEGS), 7, 0),
				new ItemStack(ModItems.getArmourByName("steelplate").get(EntityEquipmentSlot.FEET), 4, 0)
				) ;	
		
	}
	
	
	private static void addAlloyRecipes () {
		registerAlloyRecipe (new FluidStack (ModFluids.steel, 1), new FluidStack (ModFluids.iron, 2), new FluidStack (ModFluids.coal, 1)) ;
	}
	
	private static void addForgeRecipes () {
		addOreDictRecipe(new ItemStack(ModBlocks.forgeBlocks,5,0),
				"III", 
				"I I", 
				"III", 
				'I', "ingotIron");
		
		addOreDictRecipe(new ItemStack(ModBlocks.forgeAnvil,1,0),
				"   ",
				" B ",
				"III",
				'B', "blockIron",
				'I', "ingotIron");
		
		addOreDictRecipe(new ItemStack(ModBlocks.forgeHeater,1,0),
				"III",
				"IBI",
				"III",
				'B', new ItemStack(Items.bucket),
				'I', "ingotIron");
		
		addOreDictRecipe(new ItemStack(ModBlocks.forgeMaster,1,0),
				"III",
				"IRI",
				"III",
				'R', "dustRedstone",
				'I', "ingotIron");
	}
	
	private static void addMeltingRecipes () {
		
		addMeltingRecipe ("Iron", ModFluids.iron) ;
		addMeltingRecipe ("Steel", ModFluids.steel) ;
		addMeltingRecipe ("Aluminium", ModFluids.aluminium) ;
		addMeltingRecipe ("Copper", ModFluids.copper) ;
		addMeltingRecipe ("Gold", ModFluids.gold) ;
		addMeltingRecipe ("Coal", ModFluids.coal) ;
	}
	
	private static void addArmourRecipes () {
		//Paper Leather Armour
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("paperleather").get(EntityEquipmentSlot.HEAD)),
				"LLL", 
				"I I", 
				"   ", 
				'I', "paper",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("paperleather").get(EntityEquipmentSlot.CHEST)),
				"L L", 
				"LIL", 
				"III", 
				'I', "paper",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("paperleather").get(EntityEquipmentSlot.LEGS)),
				"LLL", 
				"I I", 
				"I I", 
				'I', "paper",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("paperleather").get(EntityEquipmentSlot.FEET)),
				"   ", 
				"I I", 
				"L L", 
				'I', "paper",
				'L', "leather");
		
		//Iron Leather Armour
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.HEAD)),
				"LLL", 
				"I I", 
				"   ", 
				'I', "ingotIron",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.CHEST)),
				"L L", 
				"LIL", 
				"III", 
				'I', "ingotIron",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.LEGS)),
				"LLL", 
				"I I", 
				"I I", 
				'I', "ingotIron",
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("ironleather").get(EntityEquipmentSlot.FEET)),
				"   ", 
				"I I", 
				"L L", 
				'I', "ingotIron",
				'L', "leather");
		
		//Aluminium Leather Armour
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("aluminiumleather").get(EntityEquipmentSlot.HEAD)),
				"LLL", 
				"I I", 
				"   ", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 3),
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("aluminiumleather").get(EntityEquipmentSlot.CHEST)),
				"L L", 
				"LIL", 
				"III", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 3),
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("aluminiumleather").get(EntityEquipmentSlot.LEGS)),
				"LLL", 
				"I I", 
				"I I", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 3),
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("aluminiumleather").get(EntityEquipmentSlot.FEET)),
				"   ", 
				"I I", 
				"L L", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 3),
				'L', "leather");
		
		//Steel Leather Armour
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("steelleather").get(EntityEquipmentSlot.HEAD)),
				"LLL", 
				"I I", 
				"   ", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 0),
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("steelleather").get(EntityEquipmentSlot.CHEST)),
				"L L", 
				"LIL", 
				"III", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 0),
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("steelleather").get(EntityEquipmentSlot.LEGS)),
				"LLL", 
				"I I", 
				"I I", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 0),
				'L', "leather");
		
		addOreDictRecipe(LibUtil.buildArmourCustomNBT(ModItems.getArmourByName("steelleather").get(EntityEquipmentSlot.FEET)),
				"   ", 
				"I I", 
				"L L", 
				'I', new ItemStack (ModItems.MATERIALS, 1, 0),
				'L', "leather");
	}
	
	private static void addMeltingRecipe (String material, Fluid output) {

		for (String suffix: preffixes) {
			meltingRecipes.put (suffix + material, new FluidStack (output, LibItemStats.getValue(suffix)) ) ;
			oreIDs.put (OreDictionary.getOreID(suffix + material), suffix + material) ;
		}
	}
	
	public static FluidStack findRecipe (ItemStack item) {
{'fraction_non_alphanumeric': 0.13686190568852566, 'fraction_numerical': 0.007394434714925083, 'mean_word_length': 4.562049062049062, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4672131', 'n_tokens_mistral': 6624, 'n_tokens_neox': 5565, 'n_words': 888}