Created
July 9, 2017 11:33
-
-
Save Nullcaller/1719a619204806ac432acad176058d0e to your computer and use it in GitHub Desktop.
Remove TE Steel Recipe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.arlesten.reciperemover; | |
import java.util.List; | |
import cofh.lib.util.helpers.ItemHelper; | |
import cofh.thermalexpansion.util.managers.machine.SmelterManager; | |
import net.minecraft.item.ItemStack; | |
import net.minecraftforge.fml.common.Mod; | |
import net.minecraftforge.fml.common.Mod.EventHandler; | |
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; | |
import net.minecraftforge.oredict.OreDictionary; | |
@Mod(modid = "reciperemover", name = "Recipe Remover", version = "the-only-version-there-will-ever-be", dependencies = "after:thermalexpansion") | |
public class ModRecipeRemover | |
{ | |
@EventHandler | |
public void postInit(FMLPostInitializationEvent event) { | |
removeSmelterRecipe("dustIron", 1, "dustCoal", 4); | |
removeSmelterRecipe("ingotIron", 1, "dustCoal", 4); | |
removeSmelterRecipe("dustIron", 1, "dustCharcoal", 4); | |
removeSmelterRecipe("ingotIron", 1, "dustCharcoal", 4); | |
removeSmelterRecipe("dustIron", 1, "fuelCoke", 1); | |
removeSmelterRecipe("ingotIron", 1, "fuelCoke", 1); | |
} | |
public static void removeSmelterRecipe(String primaryOreName, int primaryAmount, String secondaryOreName, int secondaryAmount) { | |
List<ItemStack> primaryOreList = OreDictionary.getOres(primaryOreName, false); | |
List<ItemStack> secondaryOreList = OreDictionary.getOres(secondaryOreName, false); | |
SmelterManager.removeRecipe(ItemHelper.cloneStack(primaryOreList.get(0), primaryAmount), ItemHelper.cloneStack(secondaryOreList.get(0), secondaryAmount)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment