Skip to content

Commit

Permalink
Check for Empty Item Entities in ItemCollector - resolves #213
Browse files Browse the repository at this point in the history
  • Loading branch information
Direwolf20-MC committed Oct 19, 2024
1 parent bbfaabe commit ee212cf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private void findItemsAndStore() {
if (respectPickupDelay && itemEntity.hasPickUpDelay())
continue;
ItemStack stack = itemEntity.getItem();
if (!isStackValidFilter(stack)) continue;
if (stack.isEmpty() || !isStackValidFilter(stack)) continue;
ItemStack leftover = ItemHandlerHelper.insertItemStacked(handler, stack, false);
if (leftover.isEmpty()) {
// If the stack is now empty, remove the ItemEntity from the collection
Expand Down

0 comments on commit ee212cf

Please sign in to comment.