From 81fb8c4a33d50c62b935648bbd20694cb2f8f749 Mon Sep 17 00:00:00 2001 From: Davide Albiero Date: Thu, 7 Mar 2024 09:08:58 +0100 Subject: [PATCH] fix: direction null check --- CHANGELOG.md | 3 +++ .../refinedstorage/blockentity/CrafterBlockEntity.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6330622dac..b60ff8604c 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fixed an error that occurred when targeting the crafter with Jade installed + ## [1.13.0-beta.3] - 2024-03-05 ### Fixed diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java index 7096d62e48..9ab198a4d1 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java @@ -8,6 +8,7 @@ import com.refinedmods.refinedstorage.screen.CrafterBlockEntitySynchronizationClientListener; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -44,8 +45,8 @@ public CrafterNetworkNode createNode(Level level, BlockPos pos) { return new CrafterNetworkNode(level, pos); } - public IItemHandler getPatterns(Direction direction) { - if (!direction.equals(this.getNode().getDirection())) { + public IItemHandler getPatterns(@Nullable Direction direction) { + if (direction != null && !direction.equals(this.getNode().getDirection())) { return getNode().getPatternInventory(); } return null;