Merge pull request #3822 from rbasamoyai/mc1.18/dev

Fix FluidTagIngredient testing null tag
This commit is contained in:
PepperCode1 2022-09-25 20:48:20 -07:00 committed by GitHub
commit 83a3de8930
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,11 +204,13 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
@SuppressWarnings("deprecation")
@Override
protected boolean testInternal(FluidStack t) {
if (tag == null)
if (tag == null) {
for (FluidStack accepted : getMatchingFluidStacks())
if (accepted.getFluid()
.isSame(t.getFluid()))
return true;
return false;
}
return t.getFluid().is(tag);
}