Merge pull request #482 from TehNut/master
Fix crashing with BiblioWoods Forestry
This commit is contained in:
commit
2a4e53714a
|
@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.compress;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
|
@ -26,7 +27,7 @@ public class StorageBlockCraftingManager
|
|||
{
|
||||
this.recipes = new StorageBlockCraftingRecipeAssimilator().getPackingRecipes();
|
||||
|
||||
System.out.println("Total number of compression recipes: " + this.recipes.size());
|
||||
AlchemicalWizardry.logger.info("Total number of compression recipes: " + this.recipes.size());
|
||||
// List<IRecipe> tempRecipeList = new LinkedList();
|
||||
//
|
||||
// World world = DimensionManager.getWorld(0);
|
||||
|
|
|
@ -21,6 +21,11 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
|
|||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class StorageBlockCraftingRecipeAssimilator {
|
||||
|
||||
public static String[] problemMods = {
|
||||
"BiblioWoodsForestry"
|
||||
};
|
||||
|
||||
public List<IRecipe> getPackingRecipes() {
|
||||
// grab all recipes potentially suitable for packing or unpacking
|
||||
|
||||
|
@ -220,12 +225,26 @@ public class StorageBlockCraftingRecipeAssimilator {
|
|||
}
|
||||
|
||||
private boolean areInputsIdentical(ItemStack a, ItemStack b) {
|
||||
if (a.getItem() != b.getItem()) return false;
|
||||
|
||||
int dmgA = a.getItemDamage();
|
||||
int dmgB = b.getItemDamage();
|
||||
try {
|
||||
if (a.getItem() != b.getItem())
|
||||
return false;
|
||||
|
||||
return dmgA == dmgB || dmgA == OreDictionary.WILDCARD_VALUE || dmgB == OreDictionary.WILDCARD_VALUE;
|
||||
int dmgA = a.getItemDamage();
|
||||
int dmgB = b.getItemDamage();
|
||||
|
||||
return dmgA == dmgB || dmgA == OreDictionary.WILDCARD_VALUE || dmgB == OreDictionary.WILDCARD_VALUE;
|
||||
} catch (NullPointerException e) {
|
||||
|
||||
AlchemicalWizardry.logger.error("A mod in this instance has registered an item with a null input. Known problem mods are:");
|
||||
|
||||
String err = "";
|
||||
for (String problem : problemMods)
|
||||
err += (err.length() > 0 ? ", " : "") + problem;
|
||||
AlchemicalWizardry.logger.error(err);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static class PackingRecipe {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"modid": "AWWayofTime",
|
||||
"name": "Blood Magic: Alchemical Wizardry",
|
||||
"description": "Rituals, spells, and more!",
|
||||
"version": "v1.3.0Beta(1.7.10)",
|
||||
"mcversion": "1.7.10",
|
||||
"version": "${version}",
|
||||
"mcversion": "${mcversion}",
|
||||
"url": "http://www.minecraftforum.net/topic/1899223-",
|
||||
"updateUrl": "",
|
||||
"authorList": ["WayofTime"],
|
||||
|
|
Loading…
Reference in a new issue