Fixed a invalid rubble crash
This commit is contained in:
parent
74bfb96976
commit
2671882e04
3 changed files with 8 additions and 7 deletions
|
@ -78,6 +78,11 @@ public class RecipeUtils
|
|||
{
|
||||
super();
|
||||
this.name = s;
|
||||
|
||||
if (OreDictionary.getOres(name).size() <= 0)
|
||||
{
|
||||
throw new RuntimeException("Added invalid OreDictResource recipe: " + name);
|
||||
}
|
||||
}
|
||||
|
||||
public OreDictResource(String s, float chance)
|
||||
|
|
|
@ -42,7 +42,6 @@ public class ItemHammer extends ItemRI
|
|||
{
|
||||
Resource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER, oreName);
|
||||
|
||||
// TODO: Fix multiple outputs.
|
||||
for (Resource resource : outputs)
|
||||
{
|
||||
ItemStack outputStack = resource.getItemStack().copy();
|
||||
|
|
|
@ -86,12 +86,9 @@ public class ResourceGenerator
|
|||
|
||||
if (OreDictionary.getOres("ore" + nameCaps).size() > 0)
|
||||
{
|
||||
if (OreDictionary.getOres("dust" + nameCaps).size() == 0)
|
||||
{
|
||||
OreDictionary.registerOre("rubble" + nameCaps, ResonantInduction.itemRubble.getStackFromMaterial(materialName));
|
||||
OreDictionary.registerOre("dust" + nameCaps, ResonantInduction.itemDust.getStackFromMaterial(materialName));
|
||||
OreDictionary.registerOre("dustRefined" + nameCaps, ResonantInduction.itemRefinedDust.getStackFromMaterial(materialName));
|
||||
}
|
||||
OreDictionary.registerOre("dust" + nameCaps, ResonantInduction.itemDust.getStackFromMaterial(materialName));
|
||||
OreDictionary.registerOre("rubble" + nameCaps, ResonantInduction.itemRubble.getStackFromMaterial(materialName));
|
||||
OreDictionary.registerOre("dustRefined" + nameCaps, ResonantInduction.itemRefinedDust.getStackFromMaterial(materialName));
|
||||
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, "ore" + nameCaps, "rubble" + nameCaps);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, "rubble" + nameCaps, "dust" + nameCaps, "dust" + nameCaps);
|
||||
|
|
Loading…
Reference in a new issue