diff --git a/CHANGELOG.md b/CHANGELOG.md index 39132f4..89ccbff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## 0.4.1 - Added formatting to quantities in the tooltips (raoulvdberge) - Fixed invalid cast server crash (raoulvdberge) -- Fixed server log spamming when destination for items are not found (raoulvdberge) +- Fixed log spamming when destination for items are not found (raoulvdberge) +- Fixed crash when item pipe in round robin mode no longer has any destination (raoulvdberge) ## 0.4 - Added filtering options for the Extractor Attachment (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedpipes/network/pipe/attachment/extractor/ItemDestinationFinder.java b/src/main/java/com/raoulvdberge/refinedpipes/network/pipe/attachment/extractor/ItemDestinationFinder.java index a85de08..27919a0 100644 --- a/src/main/java/com/raoulvdberge/refinedpipes/network/pipe/attachment/extractor/ItemDestinationFinder.java +++ b/src/main/java/com/raoulvdberge/refinedpipes/network/pipe/attachment/extractor/ItemDestinationFinder.java @@ -50,6 +50,10 @@ public Destination find(RoutingMode routingMode, BlockPos sourcePos, ItemStack e } case ROUND_ROBIN: { List destinations = network.getDestinations(DestinationType.ITEM_HANDLER); + if (destinations.isEmpty()) { + return null; + } + if (roundRobinIndex >= destinations.size()) { roundRobinIndex = 0; }