fixed lazy optional npe

Closes #1
This commit is contained in:
Ellpeck 2020-04-18 13:14:50 +02:00
parent 991bb82c2d
commit d66b5260ef
2 changed files with 2 additions and 2 deletions

View file

@ -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'

View file

@ -61,7 +61,7 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
@Nonnull
@Override
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
return cap == Registry.pipeNetworkCapability ? LazyOptional.of(() -> (T) this) : null;
return cap == Registry.pipeNetworkCapability ? LazyOptional.of(() -> (T) this) : LazyOptional.empty();
}
@Override