Make plank oreDict not hit the same entries multiple times

This commit is contained in:
pupnewfster authored and Dave Smith committed 2019-03-12 11:36:52 -06:00
1 parent b5240bd1b6
commit 3d6b202bd5
1 file changed
+3 -9
@@ -37,15 +37,9 @@ public final class OreDictManager {
addLogRecipes();
for (ItemStack ore : OreDictionary.getOres("plankWood")) {
if (ore.getHasSubtypes()) {
ItemStack wildStack = new ItemStack(ore.getItem(), 1, OreDictionary.WILDCARD_VALUE);
if (!Recipe.PRECISION_SAWMILL.containsRecipe(wildStack)) {
RecipeHandler.addPrecisionSawmillRecipe(wildStack, new ItemStack(Items.STICK, 6),
new ItemStack(MekanismItems.Sawdust), 0.25);
}
} else {
RecipeHandler.addPrecisionSawmillRecipe(StackUtils.size(ore, 1), new ItemStack(Items.STICK, 6),
ItemStack plank = StackUtils.size(ore, 1);
if (!Recipe.PRECISION_SAWMILL.containsRecipe(plank)) {
RecipeHandler.addPrecisionSawmillRecipe(plank, new ItemStack(Items.STICK, 6),
new ItemStack(MekanismItems.Sawdust), 0.25);
}
}