Fixed cables not connecting to things that dont support covers

This commit is contained in:
Buuz135
2021-09-12 12:03:57 +02:00
parent 1c06b87c1d
commit f555f378db
2 changed files with 1 additions and 2 deletions

View File

@@ -90,7 +90,6 @@ public class CoverManager {
public void readFromNbt(CompoundNBT nbt) {
covers.clear();
System.out.println(nbt);
for (String s : nbt.keySet()) {
CompoundNBT tag = nbt.getCompound(s);
if (tag.contains(NBT_DIRECTION) && tag.contains(NBT_ITEM)) {

View File

@@ -169,7 +169,7 @@ public class CableBlock extends NetworkNodeBlock implements IWaterLoggable {
if (tile == null){
return false;
}
return tile.getCapability(NetworkNodeProxyCapability.NETWORK_NODE_PROXY_CAPABILITY, direction).map(INetworkNodeProxy::getNode).map(iNetworkNode -> iNetworkNode instanceof ICoverable && (!((ICoverable) iNetworkNode).getCoverManager().hasCover(direction) || ((ICoverable) iNetworkNode).getCoverManager().getCover(direction).getType() == CoverType.HOLLOW)).orElse(false);
return tile.getCapability(NetworkNodeProxyCapability.NETWORK_NODE_PROXY_CAPABILITY, direction).map(INetworkNodeProxy::getNode).map(iNetworkNode -> !(iNetworkNode instanceof ICoverable) || (!((ICoverable) iNetworkNode).getCoverManager().hasCover(direction) || ((ICoverable) iNetworkNode).getCoverManager().getCover(direction).getType() == CoverType.HOLLOW)).orElse(false);
}
private BlockState getState(BlockState currentState, IWorld world, BlockPos pos) {