diff --git a/CHANGELOG.md b/CHANGELOG.md index 5439184..714276f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/main/java/com/refinedmods/refinedpipes/network/pipe/attachment/extractor/ExtractorAttachment.java b/src/main/java/com/refinedmods/refinedpipes/network/pipe/attachment/extractor/ExtractorAttachment.java index 9d2c8cd..b62ca8c 100644 --- a/src/main/java/com/refinedmods/refinedpipes/network/pipe/attachment/extractor/ExtractorAttachment.java +++ b/src/main/java/com/refinedmods/refinedpipes/network/pipe/attachment/extractor/ExtractorAttachment.java @@ -163,6 +163,10 @@ private void update(ItemNetwork network, BlockPos sourcePos, IItemHandler source } private Pair findDestinationAndSourceSlot(BlockPos sourcePos, IItemHandler source) { + if (source.getSlots() <= 0) { + return null; + } + int startIndex = 0; do {