Skip to content

Commit

Permalink
Make plank oreDict not hit the same entries multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
pupnewfster authored and dizzyd committed Mar 12, 2019
1 parent b5240bd commit 3d6b202
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/main/java/mekanism/common/integration/OreDictManager.java
Expand Up @@ -37,15 +37,9 @@ public static void init() {
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);
}
}
Expand Down

0 comments on commit 3d6b202

Please sign in to comment.