Fixed cables not connecting to things that dont support covers
This commit is contained in:
@@ -90,7 +90,6 @@ public class CoverManager {
|
|||||||
|
|
||||||
public void readFromNbt(CompoundNBT nbt) {
|
public void readFromNbt(CompoundNBT nbt) {
|
||||||
covers.clear();
|
covers.clear();
|
||||||
System.out.println(nbt);
|
|
||||||
for (String s : nbt.keySet()) {
|
for (String s : nbt.keySet()) {
|
||||||
CompoundNBT tag = nbt.getCompound(s);
|
CompoundNBT tag = nbt.getCompound(s);
|
||||||
if (tag.contains(NBT_DIRECTION) && tag.contains(NBT_ITEM)) {
|
if (tag.contains(NBT_DIRECTION) && tag.contains(NBT_ITEM)) {
|
||||||
|
@@ -169,7 +169,7 @@ public class CableBlock extends NetworkNodeBlock implements IWaterLoggable {
|
|||||||
if (tile == null){
|
if (tile == null){
|
||||||
return false;
|
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) {
|
private BlockState getState(BlockState currentState, IWorld world, BlockPos pos) {
|
||||||
|
Reference in New Issue
Block a user