Fix most modded fluids not working in our machines

This commit is contained in:
Modmuss50 2018-08-11 20:08:44 +01:00
parent 89beff99c7
commit 84aeeb978c
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
5 changed files with 17 additions and 15 deletions

View file

@ -25,6 +25,7 @@
package techreborn.api.generator;
import net.minecraftforge.fluids.Fluid;
import reborncore.common.util.FluidUtils;
public class FluidGeneratorRecipe {
private final EFluidGenerator generatorType;
@ -79,7 +80,7 @@ public class FluidGeneratorRecipe {
if (fluid == null) {
if (other.fluid != null)
return false;
} else if (!fluid.equals(other.fluid))
} else if (!FluidUtils.fluidEquals(other.fluid, fluid))
return false;
if (generatorType != other.generatorType)
return false;

View file

@ -26,6 +26,7 @@ package techreborn.api.generator;
import com.google.common.collect.Sets;
import net.minecraftforge.fluids.Fluid;
import reborncore.common.util.FluidUtils;
import java.util.HashSet;
import java.util.Optional;
@ -48,7 +49,7 @@ public class FluidGeneratorRecipeList {
}
public Optional<FluidGeneratorRecipe> getRecipeForFluid(Fluid fluid) {
return this.recipes.stream().filter(recipe -> recipe.getFluid().equals(fluid)).findAny();
return this.recipes.stream().filter(recipe -> FluidUtils.fluidEquals(recipe.getFluid(), fluid)).findAny();
}
public HashSet<FluidGeneratorRecipe> getRecipes() {