use of micdoodle8.mods.galacticraft.core.tile.IMultiBlock in project Galacticraft by micdoodle8.
the class BlockMachineMars method breakBlock.
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
final TileEntity var9 = worldIn.getTileEntity(pos);
if (var9 instanceof IMultiBlock) {
((IMultiBlock) var9).onDestroy(var9);
}
super.breakBlock(worldIn, pos, state);
}
use of micdoodle8.mods.galacticraft.core.tile.IMultiBlock in project Galacticraft by micdoodle8.
the class BlockSpaceStationBase method breakBlock.
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
final TileEntity tileAt = worldIn.getTileEntity(pos);
if (tileAt instanceof IMultiBlock) {
((IMultiBlock) tileAt).onDestroy(tileAt);
}
super.breakBlock(worldIn, pos, state);
}
use of micdoodle8.mods.galacticraft.core.tile.IMultiBlock in project Galacticraft by micdoodle8.
the class BlockSpaceStationBase method onBlockPlacedBy.
@Override
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
TileEntity tile = worldIn.getTileEntity(pos);
if (tile instanceof IMultiBlock) {
((IMultiBlock) tile).onCreate(worldIn, pos);
}
}
use of micdoodle8.mods.galacticraft.core.tile.IMultiBlock in project Galacticraft by micdoodle8.
the class BlockNasaWorkbench method breakBlock.
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
final TileEntity var9 = worldIn.getTileEntity(pos);
int fakeBlockCount = 0;
for (int x = -1; x < 2; x++) {
for (int y = 0; y < 4; y++) {
for (int z = -1; z < 2; z++) {
if (!(x == 0 && y == 0 && z == 0)) {
if (Math.abs(x) != 1 || Math.abs(z) != 1) {
Block block = worldIn.getBlockState(pos.add(x, y, z)).getBlock();
if ((y == 0 || y == 3) && x == 0 && z == 0) {
if (block == GCBlocks.fakeBlock) {
fakeBlockCount++;
}
} else if (y != 0 && y != 3) {
if (block == GCBlocks.fakeBlock) {
fakeBlockCount++;
}
}
}
}
}
}
}
if (fakeBlockCount >= 11 && var9 instanceof IMultiBlock) {
((IMultiBlock) var9).onDestroy(var9);
}
super.breakBlock(worldIn, pos, state);
}
use of micdoodle8.mods.galacticraft.core.tile.IMultiBlock in project MorePlanets by SteveKunG.
the class BlockSpaceWarpPadFull method breakBlock.
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof IMultiBlock) {
((IMultiBlock) tile).onDestroy(tile);
}
super.breakBlock(world, pos, state);
}
Aggregations