mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 15:03:07 +00:00
Improved recipe support for Thermal Foundation/Expansion in the SAG Mill and Alloy Smelter
This commit is contained in:
1 parent
25169811df
commit
8c5d3abc40
9 files changed
+261
-173
No files matched your search
@@ -570,12 +570,14 @@ public class EnderIO {
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
|
||||
//This must be loaded before parsing the recipes so we get the preferred outputs
|
||||
OreDictionaryPreferences.loadConfig();
|
||||
|
||||
//Regsiter the enchants
|
||||
Enchantments.getInstance();
|
||||
|
||||
MaterialRecipes.registerDependantOresInDictionary();
|
||||
|
||||
//This must be loaded before parsing the recipes so we get the preferred outputs
|
||||
OreDictionaryPreferences.loadConfig();
|
||||
|
||||
MaterialRecipes.addOreDictionaryRecipes();
|
||||
MachineRecipes.addOreDictionaryRecipes();
|
||||
ItemRecipes.addOreDictionaryRecipes();
|
||||
|
||||
@@ -2,11 +2,6 @@ package crazypants.enderio.material;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static crazypants.util.OreDictionaryHelper.INGOT_TIN;
|
||||
import static crazypants.util.OreDictionaryHelper.hasCopper;
|
||||
import static crazypants.util.OreDictionaryHelper.hasEnderPearlDust;
|
||||
import static crazypants.util.OreDictionaryHelper.hasTin;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -20,15 +15,15 @@ import crazypants.enderio.config.Config;
|
||||
import crazypants.util.OreDictionaryHelper;
|
||||
import static crazypants.enderio.EnderIO.itemBasicCapacitor;
|
||||
|
||||
import static crazypants.util.OreDictionaryHelper.INGOT_TIN;
|
||||
import static crazypants.util.OreDictionaryHelper.hasCopper;
|
||||
import static crazypants.util.OreDictionaryHelper.hasEnderPearlDust;
|
||||
import static crazypants.util.OreDictionaryHelper.hasTin;
|
||||
|
||||
|
||||
public class MaterialRecipes {
|
||||
|
||||
public static void registerOresInDictionary() {
|
||||
//Ore Dictionary Registeration
|
||||
OreDictionary.registerOre("dustCoal", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COAL.ordinal()));
|
||||
OreDictionary.registerOre("dustIron", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal()));
|
||||
OreDictionary.registerOre("dustGold", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal()));
|
||||
|
||||
public static void registerDependantOresInDictionary() {
|
||||
if(hasCopper()) {
|
||||
OreDictionary.registerOre("dustCopper", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COPPER.ordinal()));
|
||||
}
|
||||
@@ -38,6 +33,18 @@ public class MaterialRecipes {
|
||||
if(hasEnderPearlDust()) {
|
||||
OreDictionary.registerOre("dustEnderPearl", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal()));
|
||||
}
|
||||
//Enderium Base
|
||||
if(OreDictionaryHelper.hasEnderium()) {
|
||||
OreDictionary.registerOre("ingotEnderiumBase", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.INGOT_ENDERIUM_BASE.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerOresInDictionary() {
|
||||
//Ore Dictionary Registeration
|
||||
OreDictionary.registerOre("dustCoal", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COAL.ordinal()));
|
||||
OreDictionary.registerOre("dustIron", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal()));
|
||||
OreDictionary.registerOre("dustGold", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal()));
|
||||
|
||||
OreDictionary.registerOre("gearStone", new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.BASIC_GEAR.ordinal()));
|
||||
OreDictionary.registerOre("itemSilicon", new ItemStack(EnderIO.itemMaterial, 1, Material.SILICON.ordinal()));
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package crazypants.enderio.material;
|
||||
|
||||
import static crazypants.util.OreDictionaryHelper.DUST_ENDERPEARL;
|
||||
import static crazypants.util.OreDictionaryHelper.INGOT_COPPER;
|
||||
import static crazypants.util.OreDictionaryHelper.INGOT_ENDERIUM;
|
||||
import static crazypants.util.OreDictionaryHelper.INGOT_TIN;
|
||||
import static crazypants.util.OreDictionaryHelper.isRegistered;
|
||||
|
||||
@@ -13,7 +14,8 @@ public enum PowderIngot {
|
||||
POWDER_GOLD("powderGold", null),
|
||||
POWDER_COPPER("powderCopper", INGOT_COPPER),
|
||||
POWDER_TIN("powderTin", INGOT_TIN),
|
||||
POWDER_ENDER("powderEnder", DUST_ENDERPEARL);
|
||||
POWDER_ENDER("powderEnder", DUST_ENDERPEARL),
|
||||
INGOT_ENDERIUM_BASE("ingotEnderiumBase", INGOT_ENDERIUM);
|
||||
// POWDER_LEAD("powderLead", "Lead Powder", "powderLead"),
|
||||
// POWDER_SILVER("powderSilver", "Silver Powder", "powderSilver"),
|
||||
// POWDER_BRONZE("powderBronze", "Bronze Powder", "powderBronze"),
|
||||
|
||||
@@ -10,6 +10,7 @@ public final class OreDictionaryHelper {
|
||||
public static final String INGOT_COPPER = "ingotCopper";
|
||||
public static final String INGOT_TIN = "ingotTin";
|
||||
public static final String DUST_ENDERPEARL = "dustEnderPearl";
|
||||
public static final String INGOT_ENDERIUM = "ingotEnderium";
|
||||
|
||||
public static boolean isRegistered(String name) {
|
||||
if(!getOres(name).isEmpty()) {
|
||||
@@ -37,4 +38,8 @@ public final class OreDictionaryHelper {
|
||||
private OreDictionaryHelper() {
|
||||
}
|
||||
|
||||
public static boolean hasEnderium() {
|
||||
return isRegistered(INGOT_ENDERIUM);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user