mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 22:34:33 +00:00
Fix #1061 Squeezer is very "liberal" regarding oredict in Recipes
This commit is contained in:
1 parent
cbc6f9acff
commit
cbb0c15783
1 file changed
+5
-11
@@ -15,14 +15,16 @@ import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import forestry.api.recipes.ISqueezerManager;
|
||||
import forestry.api.recipes.ISqueezerRecipe;
|
||||
import forestry.core.fluids.FluidHelper;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
import forestry.core.utils.datastructures.ItemStackMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class SqueezerRecipeManager implements ISqueezerManager {
|
||||
|
||||
@@ -81,20 +83,12 @@ public class SqueezerRecipeManager implements ISqueezerManager {
|
||||
}
|
||||
}
|
||||
|
||||
// First try to match a specific recipe (without OreDictionary)
|
||||
for (ISqueezerRecipe recipe : recipes) {
|
||||
if (ItemStackUtil.containsSets(recipe.getResources(), items, false, false) > 0) {
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
||||
// If that fails - try again with OreDictionary support enabled
|
||||
for (ISqueezerRecipe recipe : recipes) {
|
||||
if (ItemStackUtil.containsSets(recipe.getResources(), items, true, false) > 0) {
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user