Graceful saving/loading and breaking of CPUs.

This commit is contained in:
AlgorithmX2
2014-07-02 00:05:21 -05:00
parent 64f2acfb43
commit 1d687f3084
4 changed files with 149 additions and 34 deletions
+13
View File
@@ -41,6 +41,9 @@ public class BlockCraftingUnit extends AEBaseBlock
@Override
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
{
if ( Platform.isClient() )
return true;
TileCraftingTile tg = getTileEntity( w, x, y, z );
if ( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
{
@@ -94,6 +97,16 @@ public class BlockCraftingUnit extends AEBaseBlock
return RenderBlockCrafting.class;
}
@Override
public void breakBlock(World w, int x, int y, int z, Block a, int b)
{
TileCraftingTile cp = getTileEntity( w, x, y, z );
if ( cp != null )
cp.breakCluster();
super.breakBlock( w, x, y, z, a, b );
}
@Override
public void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
{