Fix FluidTagIngredient testing null tag

This commit is contained in:
rbasamoyai 2022-09-25 23:36:15 -04:00 committed by GitHub
parent 96b76a83a1
commit e45d12c904
Failed to generate hash of commit

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);
}