diff --git a/src/main/java/techreborn/init/IC2Dict.java b/src/main/java/techreborn/init/IC2Dict.java index c2211c401..0cdcd7808 100644 --- a/src/main/java/techreborn/init/IC2Dict.java +++ b/src/main/java/techreborn/init/IC2Dict.java @@ -38,6 +38,7 @@ import ic2.core.ref.TeBlock; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import reborncore.api.recipe.RecipeHandler; +import reborncore.common.util.OreUtil; import techreborn.Core; import techreborn.api.recipe.machines.ExtractorRecipe; import techreborn.items.ItemParts; @@ -94,41 +95,41 @@ public class IC2Dict { try { CraftingItemType.circuit.getName(); - OreDictionary.registerOre("reBattery", ItemName.re_battery.getItemStack()); + OreUtil.registerOre("reBattery", ItemName.re_battery.getItemStack()); - OreDictionary.registerOre("circuitBasic", ItemName.crafting.getItemStack(CraftingItemType.circuit)); - OreDictionary.registerOre("circuitAdvanced", ItemName.crafting.getItemStack(CraftingItemType.advanced_circuit)); + OreUtil.registerOre("circuitBasic", ItemName.crafting.getItemStack(CraftingItemType.circuit)); + OreUtil.registerOre("circuitAdvanced", ItemName.crafting.getItemStack(CraftingItemType.advanced_circuit)); - OreDictionary.registerOre("machineBlockBasic", BlockName.resource.getItemStack(ResourceBlock.machine)); - OreDictionary.registerOre("machineBlockAdvanced", BlockName.resource.getItemStack(ResourceBlock.advanced_machine)); + OreUtil.registerOre("machineBlockBasic", BlockName.resource.getItemStack(ResourceBlock.machine)); + OreUtil.registerOre("machineBlockAdvanced", BlockName.resource.getItemStack(ResourceBlock.advanced_machine)); - OreDictionary.registerOre("lapotronCrystal", ItemName.lapotron_crystal.getItemStack()); - OreDictionary.registerOre("energyCrystal", ItemName.lapotron_crystal.getItemStack()); + OreUtil.registerOre("lapotronCrystal", ItemName.lapotron_crystal.getItemStack()); + OreUtil.registerOre("energyCrystal", ItemName.lapotron_crystal.getItemStack()); - OreDictionary.registerOre("drillBasic", ItemName.drill.getItemStack()); - OreDictionary.registerOre("drillDiamond", ItemName.diamond_drill.getItemStack()); - OreDictionary.registerOre("drillAdvanced", ItemName.iridium_drill.getItemStack()); + OreUtil.registerOre("drillBasic", ItemName.drill.getItemStack()); + OreUtil.registerOre("drillDiamond", ItemName.diamond_drill.getItemStack()); + OreUtil.registerOre("drillAdvanced", ItemName.iridium_drill.getItemStack()); ItemStack industrialTnt = BlockName.te.getItemStack(TeBlock.itnt); industrialTnt.setItemDamage(1); - OreDictionary.registerOre("industrialTnt", industrialTnt); + OreUtil.registerOre("industrialTnt", industrialTnt); - OreDictionary.registerOre("craftingIndustrialDiamond", ItemName.crafting.getItemStack(CraftingItemType.industrial_diamond)); - OreDictionary.registerOre("fertilizer", ItemName.crafting.getItemStack(CraftingItemType.bio_chaff)); - OreDictionary.registerOre("hvTransformer", BlockName.te.getItemStack(TeBlock.hv_transformer)); + OreUtil.registerOre("craftingIndustrialDiamond", ItemName.crafting.getItemStack(CraftingItemType.industrial_diamond)); + OreUtil.registerOre("fertilizer", ItemName.crafting.getItemStack(CraftingItemType.bio_chaff)); + OreUtil.registerOre("hvTransformer", BlockName.te.getItemStack(TeBlock.hv_transformer)); - OreDictionary.registerOre("uran235", ItemName.nuclear.getItemStack(NuclearResourceType.uranium_235)); - OreDictionary.registerOre("uran238", ItemName.nuclear.getItemStack(NuclearResourceType.uranium_238)); - OreDictionary.registerOre("smallUran238", ItemName.nuclear.getItemStack(NuclearResourceType.small_uranium_238)); - OreDictionary.registerOre("smallUran235", ItemName.nuclear.getItemStack(NuclearResourceType.small_uranium_235)); + OreUtil.registerOre("uran235", ItemName.nuclear.getItemStack(NuclearResourceType.uranium_235)); + OreUtil.registerOre("uran238", ItemName.nuclear.getItemStack(NuclearResourceType.uranium_238)); + OreUtil.registerOre("smallUran238", ItemName.nuclear.getItemStack(NuclearResourceType.small_uranium_238)); + OreUtil.registerOre("smallUran235", ItemName.nuclear.getItemStack(NuclearResourceType.small_uranium_235)); - OreDictionary.registerOre("fenceIron", BlockName.fence.getItemStack(BlockIC2Fence.IC2FenceType.iron)); - OreDictionary.registerOre("rubberWood", BlockName.rubber_wood.getItemStack()); - OreDictionary.registerOre("glassReinforced", BlockName.glass.getItemStack(BlockTexGlass.GlassType.reinforced)); + OreUtil.registerOre("fenceIron", BlockName.fence.getItemStack(BlockIC2Fence.IC2FenceType.iron)); + OreUtil.registerOre("rubberWood", BlockName.rubber_wood.getItemStack()); + OreUtil.registerOre("glassReinforced", BlockName.glass.getItemStack(BlockTexGlass.GlassType.reinforced)); - OreDictionary.registerOre("oreIridium", ItemName.misc_resource.getItemStack(MiscResourceType.iridium_ore)); + OreUtil.registerOre("oreIridium", ItemName.misc_resource.getItemStack(MiscResourceType.iridium_ore)); - OreDictionary.registerOre("plateIridium", ItemName.crafting.getItemStack(CraftingItemType.iridium)); + OreUtil.registerOre("plateIridium", ItemName.crafting.getItemStack(CraftingItemType.iridium)); } catch (NoClassDefFoundError notFound) { Core.logHelper.warn( diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index 371cb0de3..9475f6293 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -33,6 +33,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import reborncore.RebornRegistry; import reborncore.common.tile.TileMachineBase; +import reborncore.common.util.OreUtil; import reborncore.common.util.StringUtils; import techreborn.Core; import techreborn.blocks.*; @@ -421,57 +422,57 @@ public class ModBlocks { public static void registerOreDict() { for (String ore : BlockOre.ores) { - OreDictionary.registerOre("ore" + StringUtils.toFirstCapital(ore), BlockOre.getOreByName(ore)); + OreUtil.registerOre("ore" + StringUtils.toFirstCapital(ore), BlockOre.getOreByName(ore)); } for (String ore : BlockOre2.ores) { - OreDictionary.registerOre("ore" + StringUtils.toFirstCapital(ore), BlockOre2.getOreByName(ore)); + OreUtil.registerOre("ore" + StringUtils.toFirstCapital(ore), BlockOre2.getOreByName(ore)); } - OreDictionary.registerOre("blockSilver", BlockStorage.getStorageBlockByName("silver")); - OreDictionary.registerOre("blockAluminum", BlockStorage.getStorageBlockByName("aluminum")); - OreDictionary.registerOre("blockAluminium", BlockStorage.getStorageBlockByName("aluminum")); - OreDictionary.registerOre("blockTitanium", BlockStorage.getStorageBlockByName("titanium")); - OreDictionary.registerOre("blockChrome", BlockStorage.getStorageBlockByName("chrome")); - OreDictionary.registerOre("blockSteel", BlockStorage.getStorageBlockByName("steel")); - OreDictionary.registerOre("blockBrass", BlockStorage.getStorageBlockByName("brass")); - OreDictionary.registerOre("blockLead", BlockStorage.getStorageBlockByName("lead")); - OreDictionary.registerOre("blockElectrum", BlockStorage.getStorageBlockByName("electrum")); - OreDictionary.registerOre("blockZinc", BlockStorage.getStorageBlockByName("zinc")); - OreDictionary.registerOre("blockPlatinum", BlockStorage.getStorageBlockByName("platinum")); - OreDictionary.registerOre("blockTungsten", BlockStorage.getStorageBlockByName("tungsten")); - OreDictionary.registerOre("blockNickel", BlockStorage.getStorageBlockByName("nickel")); - OreDictionary.registerOre("blockInvar", BlockStorage.getStorageBlockByName("invar")); - OreDictionary.registerOre("blockIridium", BlockStorage.getStorageBlockByName("iridium")); - OreDictionary.registerOre("blockCopper", BlockStorage2.getStorageBlockByName("copper", 1)); - OreDictionary.registerOre("blockTin", BlockStorage2.getStorageBlockByName("tin", 1)); + OreUtil.registerOre("blockSilver", BlockStorage.getStorageBlockByName("silver")); + OreUtil.registerOre("blockAluminum", BlockStorage.getStorageBlockByName("aluminum")); + OreUtil.registerOre("blockAluminium", BlockStorage.getStorageBlockByName("aluminum")); + OreUtil.registerOre("blockTitanium", BlockStorage.getStorageBlockByName("titanium")); + OreUtil.registerOre("blockChrome", BlockStorage.getStorageBlockByName("chrome")); + OreUtil.registerOre("blockSteel", BlockStorage.getStorageBlockByName("steel")); + OreUtil.registerOre("blockBrass", BlockStorage.getStorageBlockByName("brass")); + OreUtil.registerOre("blockLead", BlockStorage.getStorageBlockByName("lead")); + OreUtil.registerOre("blockElectrum", BlockStorage.getStorageBlockByName("electrum")); + OreUtil.registerOre("blockZinc", BlockStorage.getStorageBlockByName("zinc")); + OreUtil.registerOre("blockPlatinum", BlockStorage.getStorageBlockByName("platinum")); + OreUtil.registerOre("blockTungsten", BlockStorage.getStorageBlockByName("tungsten")); + OreUtil.registerOre("blockNickel", BlockStorage.getStorageBlockByName("nickel")); + OreUtil.registerOre("blockInvar", BlockStorage.getStorageBlockByName("invar")); + OreUtil.registerOre("blockIridium", BlockStorage.getStorageBlockByName("iridium")); + OreUtil.registerOre("blockCopper", BlockStorage2.getStorageBlockByName("copper", 1)); + OreUtil.registerOre("blockTin", BlockStorage2.getStorageBlockByName("tin", 1)); - OreDictionary.registerOre("blockTungstensteel", BlockStorage2.getStorageBlockByName("tungstensteel", 1)); - OreDictionary.registerOre("blockRuby", BlockStorage2.getStorageBlockByName("ruby", 1)); - OreDictionary.registerOre("blockSapphire", BlockStorage2.getStorageBlockByName("sapphire", 1)); - OreDictionary.registerOre("blockPeridot", BlockStorage2.getStorageBlockByName("peridot", 1)); - OreDictionary.registerOre("blockYellowGarnet", BlockStorage2.getStorageBlockByName("yellowGarnet", 1)); - OreDictionary.registerOre("blockRedGarnet", BlockStorage2.getStorageBlockByName("redGarnet", 1)); + OreUtil.registerOre("blockTungstensteel", BlockStorage2.getStorageBlockByName("tungstensteel", 1)); + OreUtil.registerOre("blockRuby", BlockStorage2.getStorageBlockByName("ruby", 1)); + OreUtil.registerOre("blockSapphire", BlockStorage2.getStorageBlockByName("sapphire", 1)); + OreUtil.registerOre("blockPeridot", BlockStorage2.getStorageBlockByName("peridot", 1)); + OreUtil.registerOre("blockYellowGarnet", BlockStorage2.getStorageBlockByName("yellowGarnet", 1)); + OreUtil.registerOre("blockRedGarnet", BlockStorage2.getStorageBlockByName("redGarnet", 1)); - OreDictionary.registerOre("craftingPiston", Blocks.PISTON); - OreDictionary.registerOre("craftingPiston", Blocks.STICKY_PISTON); - OreDictionary.registerOre("crafterWood", Blocks.CRAFTING_TABLE); - OreDictionary.registerOre("machineBasic", new ItemStack(MACHINE_FRAMES, 1)); + OreUtil.registerOre("craftingPiston", Blocks.PISTON); + OreUtil.registerOre("craftingPiston", Blocks.STICKY_PISTON); + OreUtil.registerOre("crafterWood", Blocks.CRAFTING_TABLE); + OreUtil.registerOre("machineBasic", new ItemStack(MACHINE_FRAMES, 1)); - OreDictionary.registerOre("treeSapling", RUBBER_SAPLING); - OreDictionary.registerOre("saplingRubber", RUBBER_SAPLING); - OreDictionary.registerOre("logWood", new ItemStack(RUBBER_LOG, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("logRubber", new ItemStack(RUBBER_LOG, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("plankWood", new ItemStack(RUBBER_PLANKS, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("plankRubber", new ItemStack(RUBBER_PLANKS, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("treeLeaves", new ItemStack(RUBBER_LEAVES, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("leavesRubber", new ItemStack(RUBBER_LEAVES, 1, OreDictionary.WILDCARD_VALUE)); + OreUtil.registerOre("treeSapling", RUBBER_SAPLING); + OreUtil.registerOre("saplingRubber", RUBBER_SAPLING); + OreUtil.registerOre("logWood", new ItemStack(RUBBER_LOG, 1, OreDictionary.WILDCARD_VALUE)); + OreUtil.registerOre("logRubber", new ItemStack(RUBBER_LOG, 1, OreDictionary.WILDCARD_VALUE)); + OreUtil.registerOre("plankWood", new ItemStack(RUBBER_PLANKS, 1, OreDictionary.WILDCARD_VALUE)); + OreUtil.registerOre("plankRubber", new ItemStack(RUBBER_PLANKS, 1, OreDictionary.WILDCARD_VALUE)); + OreUtil.registerOre("treeLeaves", new ItemStack(RUBBER_LEAVES, 1, OreDictionary.WILDCARD_VALUE)); + OreUtil.registerOre("leavesRubber", new ItemStack(RUBBER_LEAVES, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("fenceIron", REFINED_IRON_FENCE); + OreUtil.registerOre("fenceIron", REFINED_IRON_FENCE); - OreDictionary.registerOre("machineBlockBasic", BlockMachineFrames.getFrameByName("basic", 1)); - OreDictionary.registerOre("machineBlockAdvanced", BlockMachineFrames.getFrameByName("advanced", 1)); - OreDictionary.registerOre("machineBlockHighlyAdvanced", BlockMachineFrames.getFrameByName("highly_advanced", 1)); + OreUtil.registerOre("machineBlockBasic", BlockMachineFrames.getFrameByName("basic", 1)); + OreUtil.registerOre("machineBlockAdvanced", BlockMachineFrames.getFrameByName("advanced", 1)); + OreUtil.registerOre("machineBlockHighlyAdvanced", BlockMachineFrames.getFrameByName("highly_advanced", 1)); } diff --git a/src/main/java/techreborn/init/ModItems.java b/src/main/java/techreborn/init/ModItems.java index 480cb5756..485246a6b 100644 --- a/src/main/java/techreborn/init/ModItems.java +++ b/src/main/java/techreborn/init/ModItems.java @@ -33,6 +33,7 @@ import reborncore.api.power.IEnergyInterfaceItem; import reborncore.api.power.IEnergyItemInfo; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.util.BucketHandler; +import reborncore.common.util.OreUtil; import techreborn.Core; import techreborn.api.Reference; import techreborn.blocks.BlockMachineFrames; @@ -344,7 +345,7 @@ public class ModItems { BlockMachineBase.advancedFrameStack = BlockMachineFrames.getFrameByName("advanced", 1); BlockMachineBase.basicFrameStack = BlockMachineFrames.getFrameByName("basic", 1); - OreDictionary.registerOre("itemRubber", ItemParts.getPartByName("rubber")); + OreUtil.registerOre("itemRubber", ItemParts.getPartByName("rubber")); } public static void registerItem(Item item, String name) { diff --git a/src/main/java/techreborn/init/OreDict.java b/src/main/java/techreborn/init/OreDict.java index 5d52cec13..31968c42c 100644 --- a/src/main/java/techreborn/init/OreDict.java +++ b/src/main/java/techreborn/init/OreDict.java @@ -31,6 +31,8 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.oredict.OreDictionary; +import reborncore.common.util.OreUtil; +import reborncore.common.util.StringUtils; import techreborn.Core; import techreborn.blocks.BlockMachineFrames; import techreborn.blocks.cable.BlockCable; @@ -51,59 +53,59 @@ public class OreDict { IC2Dict.init(); } - OreDictionary.registerOre("reBattery", ModItems.RE_BATTERY); + OreUtil.registerOre("reBattery", ModItems.RE_BATTERY); - OreDictionary.registerOre("circuitBasic", ItemParts.getPartByName("electronicCircuit")); - OreDictionary.registerOre("circuitAdvanced", ItemParts.getPartByName("advancedCircuit")); - OreDictionary.registerOre("circuitStorage", ItemParts.getPartByName("dataStorageCircuit")); - OreDictionary.registerOre("circuitElite", ItemParts.getPartByName("dataControlCircuit")); - OreDictionary.registerOre("circuitMaster", ItemParts.getPartByName("energyFlowCircuit")); + OreUtil.registerOre("circuitBasic", ItemParts.getPartByName("electronicCircuit")); + OreUtil.registerOre("circuitAdvanced", ItemParts.getPartByName("advancedCircuit")); + OreUtil.registerOre("circuitStorage", ItemParts.getPartByName("dataStorageCircuit")); + OreUtil.registerOre("circuitElite", ItemParts.getPartByName("dataControlCircuit")); + OreUtil.registerOre("circuitMaster", ItemParts.getPartByName("energyFlowCircuit")); - OreDictionary.registerOre("machineBlockBasic", BlockMachineFrames.getFrameByName("machine", 1)); - OreDictionary.registerOre("machineBlockAdvanced", BlockMachineFrames.getFrameByName("advancedMachine", 1)); - OreDictionary.registerOre("machineBlockElite", BlockMachineFrames.getFrameByName("highlyAdvancedMachine", 1)); + OreUtil.registerOre("machineBlockBasic", BlockMachineFrames.getFrameByName("machine", 1)); + OreUtil.registerOre("machineBlockAdvanced", BlockMachineFrames.getFrameByName("advancedMachine", 1)); + OreUtil.registerOre("machineBlockElite", BlockMachineFrames.getFrameByName("highlyAdvancedMachine", 1)); - OreDictionary.registerOre("lapotronCrystal", ModItems.LAPOTRONIC_CRYSTAL); - OreDictionary.registerOre("energyCrystal", ModItems.ENERGY_CRYSTAL); + OreUtil.registerOre("lapotronCrystal", ModItems.LAPOTRONIC_CRYSTAL); + OreUtil.registerOre("energyCrystal", ModItems.ENERGY_CRYSTAL); - OreDictionary.registerOre("drillBasic", ModItems.DIAMOND_DRILL); - OreDictionary.registerOre("drillDiamond", ModItems.DIAMOND_DRILL); + OreUtil.registerOre("drillBasic", ModItems.DIAMOND_DRILL); + OreUtil.registerOre("drillDiamond", ModItems.DIAMOND_DRILL); - OreDictionary.registerOre("industrialTnt", Blocks.TNT); - OreDictionary.registerOre("craftingIndustrialDiamond", Items.DIAMOND); - OreDictionary.registerOre("insulatedGoldCableItem", BlockCable.getCableByName("insulatedgold")); - OreDictionary.registerOre("fertilizer", new ItemStack(Items.DYE, 1, 15)); + OreUtil.registerOre("industrialTnt", Blocks.TNT); + OreUtil.registerOre("craftingIndustrialDiamond", Items.DIAMOND); + OreUtil.registerOre("insulatedGoldCableItem", BlockCable.getCableByName("insulatedgold")); + OreUtil.registerOre("fertilizer", new ItemStack(Items.DYE, 1, 15)); - OreDictionary.registerOre("ic2Generator", ModBlocks.SOLID_FUEL_GENEREATOR); - OreDictionary.registerOre("ic2SolarPanel", ModBlocks.SOLAR_PANEL); - OreDictionary.registerOre("ic2Macerator", ModBlocks.GRINDER); - OreDictionary.registerOre("ic2Extractor", ModBlocks.EXTRACTOR); - OreDictionary.registerOre("ic2Windmill", ModBlocks.WIND_MILL); - OreDictionary.registerOre("ic2Watermill", ModBlocks.WATER_MILL); + OreUtil.registerOre("ic2Generator", ModBlocks.SOLID_FUEL_GENEREATOR); + OreUtil.registerOre("ic2SolarPanel", ModBlocks.SOLAR_PANEL); + OreUtil.registerOre("ic2Macerator", ModBlocks.GRINDER); + OreUtil.registerOre("ic2Extractor", ModBlocks.EXTRACTOR); + OreUtil.registerOre("ic2Windmill", ModBlocks.WIND_MILL); + OreUtil.registerOre("ic2Watermill", ModBlocks.WATER_MILL); - //OreDictionary.registerOre("uran235", nothing); - //OreDictionary.registerOre("uran238", nothing); - //OreDictionary.registerOre("smallUran235", nothing); + //OreUtil.registerOre("uran235", nothing); + //OreUtil.registerOre("uran238", nothing); + //OreUtil.registerOre("smallUran235", nothing); - OreDictionary.registerOre("fenceIron", ModBlocks.REFINED_IRON_FENCE); + OreUtil.registerOre("fenceIron", ModBlocks.REFINED_IRON_FENCE); //TODO ic2 bug? Disabled as it crashes with this line - //OreDictionary.registerOre("woodRubber", ModBlocks.RUBBER_LOG); - OreDictionary.registerOre("glassReinforced", ModBlocks.REINFORCED_GLASS); + //OreUtil.registerOre("woodRubber", ModBlocks.RUBBER_LOG); + OreUtil.registerOre("glassReinforced", ModBlocks.REINFORCED_GLASS); - OreDictionary.registerOre("craftingDiamondGrinder", ItemParts.getPartByName("diamondGrindingHead")); - OreDictionary.registerOre("craftingTungstenGrinder", ItemParts.getPartByName("tungstenGrindingHead")); - OreDictionary.registerOre("craftingSuperconductor", ItemParts.getPartByName("superconductor")); + OreUtil.registerOre("craftingDiamondGrinder", ItemParts.getPartByName("diamondGrindingHead")); + OreUtil.registerOre("craftingTungstenGrinder", ItemParts.getPartByName("tungstenGrindingHead")); + OreUtil.registerOre("craftingSuperconductor", ItemParts.getPartByName("superconductor")); - OreDictionary.registerOre("materialResin", ItemParts.getPartByName("rubberSap")); - OreDictionary.registerOre("materialRubber", ItemParts.getPartByName("rubber")); - OreDictionary.registerOre("itemRubber", ItemParts.getPartByName("rubber")); - OreDictionary.registerOre("pulpWood", ItemDusts.getDustByName("saw_dust")); - OreDictionary.registerOre("dustAsh", ItemDusts.getDustByName("ashes")); + OreUtil.registerOre("materialResin", ItemParts.getPartByName("rubberSap")); + OreUtil.registerOre("materialRubber", ItemParts.getPartByName("rubber")); + OreUtil.registerOre("itemRubber", ItemParts.getPartByName("rubber")); + 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! - OreDictionary.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "gem_" + type), ItemGems.getGemByName(type)); + 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)) @@ -115,7 +117,7 @@ public class OreDict { for (String type : ItemIngots.types) { if (type.equals(ModItems.META_PLACEHOLDER)) continue; //Aware of placeholders! - OreDictionary.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + type), ItemIngots.getIngotByName(type)); + 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)) @@ -127,26 +129,26 @@ public class OreDict { for (String type : ItemPlates.types) { if (type.equals(ModItems.META_PLACEHOLDER)) continue; //Aware of placeholders! - OreDictionary.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "plate_" + type), ItemPlates.getPlateByName(type)); + OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "plate_" + type), ItemPlates.getPlateByName(type)); } for (String type : ItemDusts.types) { if (type.equals(ModItems.META_PLACEHOLDER)) continue; //Aware of placeholders! - OreDictionary.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_" + type), ItemDusts.getDustByName(type)); + OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_" + type), ItemDusts.getDustByName(type)); } for (String type : ItemDustsSmall.types) { if (type.equals(ModItems.META_PLACEHOLDER)) continue; //Aware of placeholders! - OreDictionary.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_tiny_" + type), ItemDustsSmall.getSmallDustByName(type)); - OreDictionary.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_small_" + type), ItemDustsSmall.getSmallDustByName(type)); + OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_tiny_" + type), ItemDustsSmall.getSmallDustByName(type)); + OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_small_" + type), ItemDustsSmall.getSmallDustByName(type)); } for (String type : ItemNuggets.types) { if (type.equals(ModItems.META_PLACEHOLDER)) continue; //Aware of placeholders! - OreDictionary.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + type), ItemNuggets.getNuggetByName(type)); + OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + type), ItemNuggets.getNuggetByName(type)); } } diff --git a/src/main/java/techreborn/items/ItemPlates.java b/src/main/java/techreborn/items/ItemPlates.java index 94a07cb65..bbdab725d 100644 --- a/src/main/java/techreborn/items/ItemPlates.java +++ b/src/main/java/techreborn/items/ItemPlates.java @@ -29,6 +29,7 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraftforge.oredict.OreDictionary; +import reborncore.common.util.OreUtil; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.events.TRRecipeHandler; import techreborn.init.ModItems; @@ -77,7 +78,7 @@ public class ItemPlates extends ItemTR { types = newTypes; newTypes[plateIndex] = plateType; String oreName = "plate" + CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, plateType); - OreDictionary.registerOre(oreName, new ItemStack(ModItems.PLATES, 1, plateIndex)); + OreUtil.registerOre(oreName, new ItemStack(ModItems.PLATES, 1, plateIndex)); } @Override