Java Code Examples for net.minecraftforge.fml.common.registry.GameRegistry#addSmelting()

The following examples show how to use net.minecraftforge.fml.common.registry.GameRegistry#addSmelting() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonProxy.java    From TofuCraftReload with MIT License 6 votes vote down vote up
@SubscribeEvent
   public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
	//boildEdamame
	GameRegistry.addSmelting( new ItemStack(ItemLoader.material,1,3), new ItemStack(ItemLoader.foodset,16,22), 0.25f);
	//SoyBeenParched
	GameRegistry.addSmelting( new ItemStack(ItemLoader.soybeans,1), new ItemStack(ItemLoader.material,1,6), 0.2f);

	GameRegistry.addSmelting( new ItemStack(ItemLoader.material,1,13), new ItemStack(ItemLoader.material,1,14), 0.2f);
	
	RecipesUtil.addOreDictionarySmelting("listAlltofu", new ItemStack(ItemLoader.tofu_food,1,3), 0.2f);
	
	GameRegistry.addSmelting(new ItemStack(ItemLoader.tofu_food,1,2), new ItemStack(ItemLoader.foodset,1,16), 0.2f);
	GameRegistry.addSmelting(new ItemStack(ItemLoader.material,1,20), new ItemStack(ItemLoader.foodset,1,8), 0.2f);
	GameRegistry.addSmelting(new ItemStack(ItemLoader.foodset,1,11), new ItemStack(ItemLoader.foodset,1,12), 0.2f);
	
	RecipesUtil.addOreDictionarySmelting("listAlltofuBlock", new ItemStack(BlockLoader.GRILD), 0.6f);
}
 
Example 2
Source File: GTRecipe.java    From GT-Classic with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static void initProcessing() {
	GameRegistry.addSmelting(GTMaterialGen.get(GTBlocks.oreSheldonite, 1), (GTMaterialGen.getIngot(GTMaterial.Platinum, 1)), 0.1F);
	maceratorUtil("oreBauxite", 1, GTMaterialGen.getDust(GTMaterial.Bauxite, 4));
	maceratorUtil("oreIridium", 1, GTMaterialGen.getDust(GTMaterial.Iridium, 2));
	TileEntityMacerator.addRecipe(GTMaterialGen.getIc2(Ic2Items.iridiumOre, 1), GTMaterialGen.getDust(GTMaterial.Iridium, 1));
	TileEntityMacerator.addRecipe("stoneMarble", 1, GTMaterialGen.getDust(GTMaterial.Calcite, 1));
	TileEntityMacerator.addRecipe("stoneLimestone", 1, GTMaterialGen.getDust(GTMaterial.Calcite, 1));
	TileEntityMacerator.addRecipe("stoneBasalt", 1, GTMaterialGen.getDust(GTMaterial.Basalt, 1));
	TileEntityMacerator.addRecipe(GTMaterialGen.get(Items.FLINT, 1), GTMaterialGen.getDust(GTMaterial.Flint, 1));
	TileEntityMacerator.addRecipe("enderpearl", 1, GTMaterialGen.getDust(GTMaterial.EnderPearl, 1));
	TileEntityMacerator.addRecipe(GTMaterialGen.get(Items.ENDER_EYE, 1), GTMaterialGen.getDust(GTMaterial.EnderEye, 2));
	TileEntityMacerator.addRecipe("gemEmerald", 1, GTMaterialGen.getDust(GTMaterial.Emerald, 1));
	TileEntityMacerator.addRecipe("logWood", 1, GTMaterialGen.getDust(GTMaterial.Wood, 6));
	TileEntityMacerator.addRecipe(GTMaterialGen.get(GTBlocks.oreChid), (GTMaterialGen.getDust(GTMaterial.BrownDye, 1)));
	TileEntityExtractor.addRecipe("oreRuby", 1, GTMaterialGen.getGem(GTMaterial.Ruby, 3), 0.1F);
	TileEntityExtractor.addRecipe("oreSapphire", 1, GTMaterialGen.getGem(GTMaterial.Sapphire, 3), 0.1F);
	TileEntityExtractor.addRecipe(GTMaterialGen.get(GTBlocks.brittleCharcoal), new ItemStack(Items.COAL, 3, 1), 0.1F);
	TileEntityCompressor.addRecipe("dustEmerald", 1, GTMaterialGen.get(Items.EMERALD, 1));
	TileEntityCompressor.addRecipe("dustCarbon", 8, GTMaterialGen.getIc2(Ic2Items.carbonFiber, 1));
	TileEntityCompressor.addRecipe("dustUranium", 1, GTMaterialGen.getIc2(Ic2Items.uraniumIngot, 1), 0.3F);
	TileEntityCompressor.addRecipe("dustThorium", 1, GTMaterialGen.getIngot(GTMaterial.Thorium, 1));
	ClassicRecipes.fluidGenerator.addEntry(GTMaterialGen.getFluid(GTMaterial.Sodium), 3800, 8);
	ClassicRecipes.fluidGenerator.addEntry(GTMaterialGen.getFluid(GTMaterial.Methane), 3000, 16);
	ClassicRecipes.fluidGenerator.addEntry(GTMaterialGen.getFluid(GTMaterial.Fuel), 4000, 30);
	GTTileTypeFilter.addOreDictFilter("dust", "dustTiny", "dustSmall", "ingot", "ingotHot", "nugget", "plate", "stick", "rod", "gear", "gem", "block", "ore", "crushed", "crushedPurified", "stone", "log", "plank", "treeSapling", "treeLeaves", "dye", "record", "crop", "machine", "circuit", "item");
	if (GTConfig.modcompat.extraTypeFilters != null && GTConfig.modcompat.extraTypeFilters.length > 0
			&& GTConfig.modcompat.extraTypeFilters.length < 64) {
		GTTileTypeFilter.addOreDictFilter(GTConfig.modcompat.extraTypeFilters);
	}
	if (GTConfig.general.addHydrogenAsLiquidFuel) {
		ClassicRecipes.fluidGenerator.addEntry(GTMaterialGen.getFluid(GTMaterial.Hydrogen), 950, 16);
	}
	ItemStack fullCan = GTMaterialGen.get(GTItems.sprayCan);
	NBTTagCompound nbt = StackUtil.getNbtData(fullCan);
	nbt.setInteger("color", 15);
	ClassicRecipes.canningMachine.registerCannerItem(GTMaterialGen.get(GTItems.sprayCanEmpty), new RecipeInputItemStack(GTMaterialGen.getTube(GTMaterial.MagicDye, 1)), fullCan);
}
 
Example 3
Source File: Recipes.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
private static void initVanillaRecipes(){
	OreDictionary.registerOre("barsIron", Blocks.IRON_BARS);
	OreDictionary.registerOre("bars", Blocks.IRON_BARS);
	OreDictionary.registerOre("doorIron", Items.IRON_DOOR);
	OreDictionary.registerOre("door", Items.IRON_DOOR);
	OreDictionary.registerOre("doorWood", Items.OAK_DOOR);
	OreDictionary.registerOre("doorWood", Items.JUNGLE_DOOR);
	OreDictionary.registerOre("doorWood", Items.SPRUCE_DOOR);
	OreDictionary.registerOre("doorWood", Items.DARK_OAK_DOOR);
	OreDictionary.registerOre("doorWood", Items.BIRCH_DOOR);
	OreDictionary.registerOre("doorWood", Items.ACACIA_DOOR);
	OreDictionary.registerOre("door", Items.OAK_DOOR);
	OreDictionary.registerOre("door", Items.JUNGLE_DOOR);
	OreDictionary.registerOre("door", Items.SPRUCE_DOOR);
	OreDictionary.registerOre("door", Items.DARK_OAK_DOOR);
	OreDictionary.registerOre("door", Items.BIRCH_DOOR);
	OreDictionary.registerOre("door", Items.ACACIA_DOOR);
	
	CrusherRecipeRegistry.addNewCrusherRecipe("oreIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe("ingotIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,1));
	CrusherRecipeRegistry.addNewCrusherRecipe("oreGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe("ingotGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,1));
	GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(cyano.basemetals.init.Items.iron_nugget,9), new ItemStack(Items.IRON_INGOT)));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_INGOT), "xxx","xxx","xxx",'x',cyano.basemetals.init.Items.iron_nugget));
	GameRegistry.addSmelting(cyano.basemetals.init.Items.iron_powder, new ItemStack(Items.IRON_INGOT), 0f);
	GameRegistry.addSmelting(cyano.basemetals.init.Items.gold_powder, new ItemStack(Items.GOLD_INGOT), 0f);
	CrusherRecipeRegistry.addNewCrusherRecipe("oreCoal", new ItemStack(cyano.basemetals.init.Items.carbon_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockCoal", new ItemStack(cyano.basemetals.init.Items.carbon_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe(new ItemStack(Items.COAL,1,0), new ItemStack(cyano.basemetals.init.Items.carbon_powder,1));
	CrusherRecipeRegistry.addNewCrusherRecipe(new ItemStack(Items.COAL,1,1), new ItemStack(cyano.basemetals.init.Items.carbon_powder,1));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.COAL_BLOCK), "xxx","xxx","xxx",'x',cyano.basemetals.init.Items.carbon_powder));
}
 
Example 4
Source File: TraverseCommon.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
static void registerSmeltingRecipe(ItemStack output, ItemStack input, float experience) {
	GameRegistry.addSmelting(input, output, experience);
}
 
Example 5
Source File: GTRecipeIterators.java    From GT-Classic with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static void createIngotRecipe(GTMaterial mat) {
	if (mat.hasFlag(GTMaterialFlag.INGOT) && mat.hasFlag(GTMaterialFlag.DUST) && mat.getSmeltable()) {
		GameRegistry.addSmelting(GTMaterialGen.getDust(mat, 1), (GTMaterialGen.getIngot(mat, 1)), 0.1F);
	}
}
 
Example 6
Source File: CommonProxy.java    From YouTubeModdingTutorial with MIT License 4 votes vote down vote up
public void postInit(FMLPostInitializationEvent e) {
    GameRegistry.addSmelting(ModBlocks.blockFancyOre, new ItemStack(ModItems.itemFancyIngot, 1), 0.5f);
    OreDictionary.registerOre("oreFancy", ModBlocks.blockFancyOre);
}
 
Example 7
Source File: TraverseCommon.java    From Traverse-Legacy-1-12-2 with MIT License 4 votes vote down vote up
static void registerSmeltingRecipe(ItemStack output, ItemStack input, float experience) {
	GameRegistry.addSmelting(input, output, experience);
}
 
Example 8
Source File: SmeltingRecipe.java    From customstuff4 with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected void doInit(InitPhase phase, ContentHelper helper)
{
    GameRegistry.addSmelting(input.getItemStack(), result.getItemStack(), xp);
}