fix default implementation for IItemSource having inverted output

This commit is contained in:
Glease committed 2022-09-13 16:37:06 +08:00
1 parent 9700499da2
commit f5b2f41ad6
1 file changed
+1 -1
@@ -54,7 +54,7 @@ public interface IItemSource {
default boolean takeOne(ItemStack stack, boolean simulate) {
if (stack == null || stack.getItem() == null || stack.stackSize != 1) throw new IllegalArgumentException();
ItemStack took = takeOne(ItemStackPredicate.from(stack, NBTMode.EXACT), simulate);
return took == null || took.stackSize <= 0;
return took != null && took.stackSize > 0;
}
/**