From 75d337ba8cfcfd8054a3e254dba70b991e8e0519 Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Sun, 23 Jun 2024 09:46:36 -0400 Subject: [PATCH] Use safer fluidstack comparisons in FluidIngredient (#6317) * Use safer fluidstack comparisons * switched to getFluid check --- .../simibubi/create/foundation/fluid/FluidIngredient.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java index ba85a3dc2..0a6fcca97 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java @@ -152,8 +152,7 @@ public abstract class FluidIngredient implements Predicate { @Override protected boolean testInternal(FluidStack t) { - if (!t.getFluid() - .isSame(fluid)) + if (t.getFluid() != fluid) return false; if (tagToMatch.isEmpty()) return true; @@ -206,8 +205,7 @@ public abstract class FluidIngredient implements Predicate { protected boolean testInternal(FluidStack t) { if (tag == null) { for (FluidStack accepted : getMatchingFluidStacks()) - if (accepted.getFluid() - .isSame(t.getFluid())) + if (accepted.getFluid() != t.getFluid()) return true; return false; }