Facades now drop with the removal of cable.

This commit is contained in:
AlgorithmX2 2014-02-09 19:03:19 -06:00
parent 9f26cc0b43
commit df1ba5282a

View file

@ -853,6 +853,27 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
@Override
public void PartChanged()
{
if ( center == null )
{
List<ItemStack> facades = new LinkedList();
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
{
IFacadePart fp = fc.getFacade( d );
if ( fp != null )
{
facades.add( fp.getItemStack() );
fc.removeFacade( tcb, d );
}
}
if ( facades != null && !facades.isEmpty() )
{
TileEntity te = tcb.getTile();
Platform.spawnDrops( te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, facades );
}
}
tcb.PartChanged();
}