it cant be null
@Override
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
if(cap.equals(AltarCapabilityDef.ALTAR_INVENTORY)){
return holder.cast();
}
return null;
}
dont return null here that will break use LazyOptional.empty()
in build.gradle
you need to change the maven url in the build buildscript
from https://files.minecraftforge.net/maven to https://maven.minecraftforge.net/
and
put this somewhere in the build.gradle
repositories {
maven { url = 'https://libraries.minecraft.net/' }
mavenCentral()
maven { url = 'https://maven.minecraftforge.net/' }
}
if you already have a repositories block put it in there