Skip to content

Commit

Permalink
Add direction null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Edivad99 authored Mar 5, 2024
1 parent 3231f70 commit 5f9e348
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5f9e348

Please sign in to comment.