Move type registry to before the ic2 dict, add advanced alloy to classic dedupe.

This commit is contained in:
modmuss50 2019-02-04 21:51:21 +00:00
parent 8549129870
commit 6595bb80c5
3 changed files with 29 additions and 26 deletions

View file

@ -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;

View file

@ -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!

View file

@ -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));