Skip to content

Commit

Permalink
Fix list aspects considering apples instead of empty, Closes #301
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Aug 9, 2024
1 parent 0e2187f commit bab1e84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public class IngredientPredicateFluidStackList extends IngredientPredicate<Fluid
private final boolean checkNbt;

public IngredientPredicateFluidStackList(boolean blacklist, int amount, boolean exactAmount, IValueTypeListProxy<ValueObjectTypeFluidStack, ValueObjectTypeFluidStack.ValueFluidStack> fluidStacks, int matchFlags, boolean checkFluid, boolean checkAmount, boolean checkNbt) {
super(IngredientComponent.FLUIDSTACK, Iterables.transform(fluidStacks, stack -> TunnelFluidHelpers.prototypeWithCount(stack.getRawValue(), amount)), matchFlags, blacklist, false, amount, exactAmount);
super(IngredientComponent.FLUIDSTACK,
Iterables.transform(
Iterables.filter(fluidStacks, fluidStack -> !fluidStack.getRawValue().isEmpty()),
stack -> TunnelFluidHelpers.prototypeWithCount(stack.getRawValue(), amount)), matchFlags, blacklist, false, amount, exactAmount);
this.blacklist = blacklist;
this.fluidStacks = fluidStacks;
this.checkFluid = checkFluid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public class IngredientPredicateItemStackList extends IngredientPredicate<ItemSt
private final boolean checkNbt;

public IngredientPredicateItemStackList(boolean blacklist, int amount, boolean exactAmount, IValueTypeListProxy<ValueObjectTypeItemStack, ValueObjectTypeItemStack.ValueItemStack> itemStacks, int matchFlags, boolean checkStackSize, boolean checkItem, boolean checkNbt) {
super(IngredientComponent.ITEMSTACK, Iterables.transform(itemStacks, stack -> TunnelItemHelpers.prototypeWithCount(stack.getRawValue(), amount)), matchFlags, blacklist, false, amount, exactAmount);
super(IngredientComponent.ITEMSTACK,
Iterables.transform(
Iterables.filter(itemStacks, itemStack -> !itemStack.getRawValue().isEmpty()),
stack -> TunnelItemHelpers.prototypeWithCount(stack.getRawValue(), amount)), matchFlags, blacklist, false, amount, exactAmount);
this.blacklist = blacklist;
this.itemStacks = itemStacks;
this.checkStackSize = checkStackSize;
Expand Down

0 comments on commit bab1e84

Please sign in to comment.