From d66b5260efe224a2a9bdf1a13801477309562a55 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 18 Apr 2020 13:14:50 +0200 Subject: [PATCH] fixed lazy optional npe Closes #1 --- build.gradle | 2 +- src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index fda40de..ec7831d 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.0.0' +version = '1.0.1' group = 'de.ellpeck.prettypipes' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'PrettyPipes' diff --git a/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java b/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java index 12b6721..af76115 100644 --- a/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java +++ b/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java @@ -61,7 +61,7 @@ public class PipeNetwork implements ICapabilitySerializable, GraphL @Nonnull @Override public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction side) { - return cap == Registry.pipeNetworkCapability ? LazyOptional.of(() -> (T) this) : null; + return cap == Registry.pipeNetworkCapability ? LazyOptional.of(() -> (T) this) : LazyOptional.empty(); } @Override