From 6595bb80c537fe85695cecac4017c442d790ab4c Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Mon, 4 Feb 2019 21:51:21 +0000 Subject: [PATCH] Move type registry to before the ic2 dict, add advanced alloy to classic dedupe. --- .../java/techreborn/init/IC2Duplicates.java | 3 +- src/main/java/techreborn/init/OreDict.java | 49 ++++++++++--------- .../init/recipes/SmeltingRecipes.java | 3 +- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/main/java/techreborn/init/IC2Duplicates.java b/src/main/java/techreborn/init/IC2Duplicates.java index d1c079e95..be4b0168f 100644 --- a/src/main/java/techreborn/init/IC2Duplicates.java +++ b/src/main/java/techreborn/init/IC2Duplicates.java @@ -79,7 +79,8 @@ public enum IC2Duplicates { REFINED_IRON(ItemIngots.getIngotByName("refined_iron"), true), BASIC_MACHINE_FRAME(BlockMachineFrames.getFrameByName("basic"), true), ADVANCED_MACHINE_FRAME(BlockMachineFrames.getFrameByName("advanced"), true), - CARBON_PLATE(ItemPlates.getPlateByName("carbon"), true); + CARBON_PLATE(ItemPlates.getPlateByName("carbon"), true), + ADVANCED_ALLOY(ItemPlates.getPlateByName("advanced_alloy"), true); ItemStack ic2Stack; diff --git a/src/main/java/techreborn/init/OreDict.java b/src/main/java/techreborn/init/OreDict.java index ecd46ca88..f26879538 100644 --- a/src/main/java/techreborn/init/OreDict.java +++ b/src/main/java/techreborn/init/OreDict.java @@ -51,6 +51,31 @@ public class OreDict { ); public static void init() { + + for (String type : ItemGems.types) { + if (type.equals(ModItems.META_PLACEHOLDER)) + continue; //Aware of placeholders! + OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "gem_" + type), ItemGems.getGemByName(type)); + boolean ignoreIt = false; + for (String ignore : plateGenIgnores) + if (type.startsWith(ignore)) + ignoreIt = true; + if (!ignoreIt) + ItemPlates.registerType(type); + } + + for (String type : ItemIngots.types) { + if (type.equals(ModItems.META_PLACEHOLDER)) + continue; //Aware of placeholders! + OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + type), ItemIngots.getIngotByName(type)); + boolean ignoreIt = false; + for (String ignore : plateGenIgnores) + if (type.startsWith(ignore)) + ignoreIt = true; + if (!ignoreIt) + ItemPlates.registerType(type); + } + if(TechRebornAPI.ic2Helper != null){ TechRebornAPI.ic2Helper.initDuplicates(); } @@ -108,30 +133,6 @@ public class OreDict { OreUtil.registerOre("pulpWood", ItemDusts.getDustByName("saw_dust")); OreUtil.registerOre("dustAsh", ItemDusts.getDustByName("ashes")); - for (String type : ItemGems.types) { - if (type.equals(ModItems.META_PLACEHOLDER)) - continue; //Aware of placeholders! - OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "gem_" + type), ItemGems.getGemByName(type)); - boolean ignoreIt = false; - for (String ignore : plateGenIgnores) - if (type.startsWith(ignore)) - ignoreIt = true; - if (!ignoreIt) - ItemPlates.registerType(type); - } - - for (String type : ItemIngots.types) { - if (type.equals(ModItems.META_PLACEHOLDER)) - continue; //Aware of placeholders! - OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + type), ItemIngots.getIngotByName(type)); - boolean ignoreIt = false; - for (String ignore : plateGenIgnores) - if (type.startsWith(ignore)) - ignoreIt = true; - if (!ignoreIt) - ItemPlates.registerType(type); - } - for (String type : ItemPlates.types) { if (type.equals(ModItems.META_PLACEHOLDER)) continue; //Aware of placeholders! diff --git a/src/main/java/techreborn/init/recipes/SmeltingRecipes.java b/src/main/java/techreborn/init/recipes/SmeltingRecipes.java index 8304eabd4..4f0094c66 100644 --- a/src/main/java/techreborn/init/recipes/SmeltingRecipes.java +++ b/src/main/java/techreborn/init/recipes/SmeltingRecipes.java @@ -40,13 +40,14 @@ public class SmeltingRecipes extends RecipeMethods { register(getMaterial("sap", Type.PART), getMaterial("rubber", Type.PART)); if(!IC2Duplicates.isClassicalDedupe()){ register(getStack(Items.IRON_INGOT), getMaterial("refined_iron", Type.INGOT)); + register(IC2Duplicates.MIXED_METAL.getStackBasedOnConfig(), getMaterial("advanced_alloy", Type.INGOT)); } register(BlockOre2.getOreByName("copper"), getMaterial("copper", Type.INGOT)); register(BlockOre2.getOreByName("tin"), getMaterial("tin", Type.INGOT)); register(BlockOre.getOreByName("silver"), getMaterial("silver", Type.INGOT)); register(BlockOre.getOreByName("lead"), getMaterial("lead", Type.INGOT)); register(BlockOre.getOreByName("sheldonite"), getMaterial("platinum", Type.INGOT)); - register(IC2Duplicates.MIXED_METAL.getStackBasedOnConfig(), getMaterial("advanced_alloy", Type.INGOT)); + // Dust smelting register(getMaterial("iron", Type.DUST), getStack(Items.IRON_INGOT));