Skip to content

Instantly share code, notes, and snippets.

@Nullcaller
Created July 9, 2017 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nullcaller/1719a619204806ac432acad176058d0e to your computer and use it in GitHub Desktop.
Save Nullcaller/1719a619204806ac432acad176058d0e to your computer and use it in GitHub Desktop.
Remove TE Steel Recipe
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