Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

Commit

Permalink
Fixed crash when item pipe in round robin mode no longer has any dest…
Browse files Browse the repository at this point in the history
…ination. Fixes #6
  • Loading branch information
raoulvdberge committed May 9, 2020
1 parent ead24b0 commit e7b0653
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public Destination find(RoutingMode routingMode, BlockPos sourcePos, ItemStack e
}
case ROUND_ROBIN: {
List<Destination> destinations = network.getDestinations(DestinationType.ITEM_HANDLER);
if (destinations.isEmpty()) {
return null;
}

if (roundRobinIndex >= destinations.size()) {
roundRobinIndex = 0;
}
Expand Down

0 comments on commit e7b0653

Please sign in to comment.