mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 14:34:16 +01:00
Use safer fluidstack comparisons in FluidIngredient (#6317)
* Use safer fluidstack comparisons * switched to getFluid check
This commit is contained in:
parent
d66170c8fe
commit
75d337ba8c
@ -152,8 +152,7 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
|
||||
|
||||
@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<FluidStack> {
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user