mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +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
1 changed files with 2 additions and 4 deletions
|
@ -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 a new issue