Unexpected disconnection #2
This commit is contained in:
parent
e9e88db6dd
commit
2b8cca2565
2 changed files with 7 additions and 14 deletions
|
@ -276,6 +276,9 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
|
||||||
rConnect = 1;
|
rConnect = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (getBaseMetaTileEntity().getOffsetX(aSide, 1) >> 4 != getBaseMetaTileEntity().getXCoord() >> 4
|
||||||
|
|| getBaseMetaTileEntity().getOffsetZ(aSide, 1) >> 4 != getBaseMetaTileEntity().getZCoord() >> 4) { // if chunk unloaded
|
||||||
|
rConnect = -1;
|
||||||
}
|
}
|
||||||
if (rConnect > 0) {
|
if (rConnect > 0) {
|
||||||
super.connect(aSide);
|
super.connect(aSide);
|
||||||
|
@ -283,19 +286,6 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
|
||||||
return rConnect;
|
return rConnect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void disconnect(byte aSide) {
|
|
||||||
if (aSide >= 6) return;
|
|
||||||
mConnections &= ~(1 << aSide);
|
|
||||||
if (GT_Mod.gregtechproxy.gt6Cable) {
|
|
||||||
byte tSide = GT_Utility.getOppositeSide(aSide);
|
|
||||||
IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide);
|
|
||||||
IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity();
|
|
||||||
if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) != 0)
|
|
||||||
((MetaPipeEntity) tPipe).disconnect(tSide);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -253,6 +253,9 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (getBaseMetaTileEntity().getOffsetX(aSide, 1) >> 4 != getBaseMetaTileEntity().getXCoord() >> 4
|
||||||
|
|| getBaseMetaTileEntity().getOffsetZ(aSide, 1) >> 4 != getBaseMetaTileEntity().getZCoord() >> 4) { // if chunk unloaded
|
||||||
|
rConnect = -1;
|
||||||
}
|
}
|
||||||
if (rConnect > 0) {
|
if (rConnect > 0) {
|
||||||
super.connect(aSide);
|
super.connect(aSide);
|
||||||
|
|
Loading…
Reference in a new issue