This commit is contained in:
parent
3caab8d4ff
commit
699ea26ba4
1 changed files with 4 additions and 1 deletions
|
@ -556,6 +556,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
* HashMap of Recipes based on their Fluids
|
* HashMap of Recipes based on their Fluids
|
||||||
*/
|
*/
|
||||||
public final Map<Fluid, Collection<GT_Recipe>> mRecipeFluidMap = new /*Concurrent*/HashMap<Fluid, Collection<GT_Recipe>>();
|
public final Map<Fluid, Collection<GT_Recipe>> mRecipeFluidMap = new /*Concurrent*/HashMap<Fluid, Collection<GT_Recipe>>();
|
||||||
|
public final HashSet<String> mRecipeFluidNameMap = new HashSet<String>();
|
||||||
/**
|
/**
|
||||||
* The List of all Recipes
|
* The List of all Recipes
|
||||||
*/
|
*/
|
||||||
|
@ -664,6 +665,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
Collection<GT_Recipe> tList = mRecipeFluidMap.get(aFluid.getFluid());
|
Collection<GT_Recipe> tList = mRecipeFluidMap.get(aFluid.getFluid());
|
||||||
if (tList == null) mRecipeFluidMap.put(aFluid.getFluid(), tList = new HashSet<GT_Recipe>(1));
|
if (tList == null) mRecipeFluidMap.put(aFluid.getFluid(), tList = new HashSet<GT_Recipe>(1));
|
||||||
tList.add(aRecipe);
|
tList.add(aRecipe);
|
||||||
|
if(!mRecipeFluidNameMap.contains(aFluid.getFluid().getName()))
|
||||||
|
mRecipeFluidNameMap.add(aFluid.getFluid().getName());
|
||||||
}
|
}
|
||||||
return addToItemMap(aRecipe);
|
return addToItemMap(aRecipe);
|
||||||
}
|
}
|
||||||
|
@ -696,7 +699,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
* @return if this Fluid is a valid Input for any for the Recipes
|
* @return if this Fluid is a valid Input for any for the Recipes
|
||||||
*/
|
*/
|
||||||
public boolean containsInput(Fluid aFluid) {
|
public boolean containsInput(Fluid aFluid) {
|
||||||
return aFluid != null && mRecipeFluidMap.containsKey(aFluid);
|
return aFluid != null && mRecipeFluidNameMap.contains(aFluid.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
|
public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
|
||||||
|
|
Loading…
Reference in a new issue