Skip to content

Commit

Permalink
Fix #177
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Sep 26, 2022
1 parent ff4f5ac commit 8e69aac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static Map<String, RawOreDropMapping> getOreMap() {

public static void init() {
if(((IConfigurable)(ModItems.raw_ore)).isEnabled()) {
if(ConfigBlocksItems.enableCopper || !OreDictionary.getOres("oreCopper").isEmpty()) {
if(ConfigBlocksItems.enableCopper || !OreDictionary.getOres("ingotCopper").isEmpty()) {
addOre("oreCopper", ModItems.raw_ore);
}
addOre("oreIron", ModItems.raw_ore, 1);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ganymedes01/etfuturum/items/ItemRawOre.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void getSubItems(Item item, CreativeTabs tabs, List list) {
super.getSubItems(item, tabs, list);
} else {
for (int i = 0; i < types.length; i++) {
if(!OreDictionary.getOres("ore" + StringUtils.capitalize(types[i])).isEmpty()) {
if(!OreDictionary.getOres("ingot" + StringUtils.capitalize(types[i])).isEmpty()) {
list.add(new ItemStack(item, 1, i));
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/ganymedes01/etfuturum/recipes/ModRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,18 @@ private static void registerRecipes() {
// }

if (ConfigBlocksItems.enableRawOres) {
Item result = null;
if(ConfigBlocksItems.enableCopper) {
result = ModItems.copper_ingot;
} else
if(!OreDictionary.getOres("ingotCopper").isEmpty()) {
result = OreDictionary.getOres("ingotCopper").get(0).getItem();
}

if(result != null) {
addShapedRecipe(new ItemStack(ModBlocks.raw_ore_block, 1, 0), "xxx", "xxx", "xxx", 'x', new ItemStack(ModItems.raw_ore, 1, 0));
addShapedRecipe(new ItemStack(ModItems.raw_ore, 9, 0), "x", 'x', new ItemStack(ModBlocks.raw_ore_block, 1, 0));
GameRegistry.addSmelting(new ItemStack(ModItems.raw_ore, 1, 0), new ItemStack(ModItems.copper_ingot, 1, 0), 0.7F);
GameRegistry.addSmelting(new ItemStack(ModItems.raw_ore, 1, 0), new ItemStack(result, 1, 0), 0.7F);
}
addShapedRecipe(new ItemStack(ModBlocks.raw_ore_block, 1, 1), "xxx", "xxx", "xxx", 'x', new ItemStack(ModItems.raw_ore, 1, 1));
addShapedRecipe(new ItemStack(ModItems.raw_ore, 9, 1), "x", 'x', new ItemStack(ModBlocks.raw_ore_block, 1, 1));
Expand Down

0 comments on commit 8e69aac

Please sign in to comment.