From 8a26720c1298ffed44dcd9bd4d03b19666a42645 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 | 4 ++++ .../refinedstorage/blockentity/CrafterBlockEntity.java | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfea5ca4d8..b3199c5db0 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Added Hungarian translation. +### 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;