fix default implementation for IItemSource having inverted output

This commit is contained in:
Glease committed 2022-09-16 18:57:04 +08:00
1 parent f813104ec4
commit 2dd4349e54
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;
}
/**