Merge pull request #3647 from Edivad99/develop
Add direction null check
This commit is contained in:
@@ -11,6 +11,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
- Added Hungarian translation.
|
- Added Hungarian translation.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an error that occurred when targeting the crafter with Jade installed
|
||||||
|
|
||||||
## [1.13.0-beta.3] - 2024-03-05
|
## [1.13.0-beta.3] - 2024-03-05
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@@ -8,6 +8,7 @@ import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizatio
|
|||||||
import com.refinedmods.refinedstorage.screen.CrafterBlockEntitySynchronizationClientListener;
|
import com.refinedmods.refinedstorage.screen.CrafterBlockEntitySynchronizationClientListener;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
@@ -44,8 +45,8 @@ public class CrafterBlockEntity extends NetworkNodeBlockEntity<CrafterNetworkNod
|
|||||||
return new CrafterNetworkNode(level, pos);
|
return new CrafterNetworkNode(level, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IItemHandler getPatterns(Direction direction) {
|
public IItemHandler getPatterns(@Nullable Direction direction) {
|
||||||
if (!direction.equals(this.getNode().getDirection())) {
|
if (direction != null && !direction.equals(this.getNode().getDirection())) {
|
||||||
return getNode().getPatternInventory();
|
return getNode().getPatternInventory();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user