mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 22:44:07 +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
|
@Override
|
||||||
protected boolean testInternal(FluidStack t) {
|
protected boolean testInternal(FluidStack t) {
|
||||||
if (!t.getFluid()
|
if (t.getFluid() != fluid)
|
||||||
.isSame(fluid))
|
|
||||||
return false;
|
return false;
|
||||||
if (tagToMatch.isEmpty())
|
if (tagToMatch.isEmpty())
|
||||||
return true;
|
return true;
|
||||||
@ -206,8 +205,7 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
|
|||||||
protected boolean testInternal(FluidStack t) {
|
protected boolean testInternal(FluidStack t) {
|
||||||
if (tag == null) {
|
if (tag == null) {
|
||||||
for (FluidStack accepted : getMatchingFluidStacks())
|
for (FluidStack accepted : getMatchingFluidStacks())
|
||||||
if (accepted.getFluid()
|
if (accepted.getFluid() != t.getFluid())
|
||||||
.isSame(t.getFluid()))
|
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user