Fixes 4529: Updated IPart to match new ICapabilityProvider (#4534)

This commit is contained in:
yueh
2020-08-01 21:01:19 +02:00
committed by GitHub
parent d66986df85
commit 259d932946
3 changed files with 7 additions and 4 deletions
@@ -210,7 +210,7 @@ public class DualityFluidInterface
} else if (capabilityClass == Capabilities.STORAGE_MONITORABLE_ACCESSOR) {
return (LazyOptional<T>) LazyOptional.of(() -> this.accessor);
}
return null;
return LazyOptional.empty();
}
private boolean hasConfig() {
@@ -311,7 +311,7 @@ public class CableBusTileEntity extends AEBaseTileEntity implements AEMultiTile
IPart part = this.getPart(partLocation);
LazyOptional<T> result = part == null ? LazyOptional.empty() : part.getCapability(capabilityClass);
if (result != null) {
if (result.isPresent()) {
return result;
}