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 Extractor Attachment is interacting with inventories…
Browse files Browse the repository at this point in the history
… that have no slots. Fixes #106
  • Loading branch information
raoulvdberge committed Jan 30, 2022
1 parent 9af99a9 commit 1224833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed

- Fixed random client crashes by [@malte0811](https://github.com/malte0811).
- Fixed crash when Extractor Attachment is interacting with inventories that have no slots.

## [0.6.0] - 2021-12-18

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ private void update(ItemNetwork network, BlockPos sourcePos, IItemHandler source
}

private Pair<Destination, Integer> findDestinationAndSourceSlot(BlockPos sourcePos, IItemHandler source) {
if (source.getSlots() <= 0) {
return null;
}

int startIndex = 0;

do {
Expand Down

0 comments on commit 1224833

Please sign in to comment.