Tweak how nugget recipes are done once again, and \o/ 2500th commit!
This commit is contained in:
parent
2e9bf11569
commit
415660c988
2 changed files with 10 additions and 5 deletions
|
@ -996,16 +996,14 @@ public class ModRecipes {
|
|||
}
|
||||
|
||||
for (String nuggets : ItemNuggets.types) {
|
||||
if (nuggets.equals(ModItems.META_PLACEHOLDER))
|
||||
if (nuggets.equals(ModItems.META_PLACEHOLDER) || nuggets.equalsIgnoreCase("diamond"))
|
||||
continue; //Aware of placeholders!
|
||||
CraftingHelper.addShapelessOreRecipe(ItemNuggets.getNuggetByName(nuggets, 9), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + nuggets));
|
||||
if (OreDictionary.getOres(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + nuggets)).size() > 0) {
|
||||
CraftingHelper.addShapelessOreRecipe(OreDictionary.getOres(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + nuggets)).get(0), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets), ItemNuggets.getNuggetByName(nuggets));
|
||||
}
|
||||
CraftingHelper.addShapelessOreRecipe(ItemIngots.getIngotByName(nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets));
|
||||
}
|
||||
|
||||
CraftingHelper.addShapelessOreRecipe(ItemNuggets.getNuggetByName("diamond", 9), "gemDiamond");
|
||||
CraftingHelper.addShapelessOreRecipe(new ItemStack(Items.DIAMOND), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"), ItemNuggets.getNuggetByName("diamond"));
|
||||
CraftingHelper.addShapelessOreRecipe(new ItemStack(Items.DIAMOND), "nuggetDiamond", "nuggetDiamond", "nuggetDiamond", "nuggetDiamond", "nuggetDiamond", "nuggetDiamond", "nuggetDiamond", "nuggetDiamond", "nuggetDiamond");
|
||||
|
||||
CraftingHelper.addShapelessOreRecipe(BlockStorage2.getStorageBlockByName("iridium_reinforced_stone", 1), new ItemStack(Blocks.STONE), ItemIngots.getIngotByName("iridium"));
|
||||
CraftingHelper.addShapelessOreRecipe(BlockStorage2.getStorageBlockByName("iridium_reinforced_tungstensteel", 1), BlockStorage2.getStorageBlockByName("tungstensteel", 1), ItemIngots.getIngotByName("iridium"));
|
||||
|
|
|
@ -2,6 +2,7 @@ package techreborn.items;
|
|||
|
||||
import com.google.common.base.CaseFormat;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
@ -29,6 +30,12 @@ public class ItemIngots extends ItemTRNoDestroy {
|
|||
return new ItemStack(ModItems.ingots, count, i);
|
||||
}
|
||||
}
|
||||
if (name.equalsIgnoreCase("iron")) {
|
||||
return new ItemStack(Items.IRON_INGOT);
|
||||
}
|
||||
if (name.equalsIgnoreCase("gold")) {
|
||||
return new ItemStack(Items.GOLD_INGOT);
|
||||
}
|
||||
throw new InvalidParameterException("The ingot " + name + " could not be found.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue