host now responsible for cleanup, fixes onWrench MultiPart deletion.

This commit is contained in:
AlgorithmX2
2014-04-10 15:01:04 -05:00
parent 327c1d4118
commit 79bbdd0bd1
4 changed files with 17 additions and 2 deletions
+5
View File
@@ -496,4 +496,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
return cb.isEmpty();
}
@Override
public void cleanup() {
tile().remPart( this );
}
}
+5
View File
@@ -968,4 +968,9 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
return myLayerFlags;
}
@Override
public void cleanup() {
tcb.cleanup();
}
}
+1 -1
View File
@@ -104,7 +104,7 @@ public class PartPlacement
}
if ( host.isEmpty() )
world.setBlock( x, y, z, Platform.air );
host.cleanup();
if ( is != null && !is.isEmpty() )
{
+6 -1
View File
@@ -41,7 +41,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
public CableBusContainer cb = new CableBusContainer( this );
private int oldLV = -1; // on re-calculate light when it changes
class CableBusHandler extends AETileEventHandler
{
@@ -319,6 +319,11 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
{
return cb.getLayerFlags();
}
@Override
public void cleanup() {
getWorldObj().setBlock( xCoord, yCoord, zCoord, Platform.air );
}
/**
* Immibis MB Support