Skip to content

Commit

Permalink
fix: direction null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Edivad99 committed Mar 7, 2024
1 parent 3231f70 commit 10a2679
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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 10a2679

Please sign in to comment.