From 5f9e348d0649adff9eb23c14dcfdd370c1a27389 Mon Sep 17 00:00:00 2001 From: Davide Albiero Date: Tue, 5 Mar 2024 21:26:48 +0100 Subject: [PATCH] Add direction null check --- .../refinedstorage/blockentity/CrafterBlockEntity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java index 7096d62e48..7fca41ac8f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java @@ -7,6 +7,7 @@ import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationSpec; import com.refinedmods.refinedstorage.screen.CrafterBlockEntitySynchronizationClientListener; +import javax.annotation.Nullable; import javax.annotation.Nonnull; import net.minecraft.core.BlockPos; @@ -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;