Search in sources :

Example 11 with IMultiBlock

use of micdoodle8.mods.galacticraft.core.tile.IMultiBlock in project Galacticraft by micdoodle8.

the class BlockLandingPadFull 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);
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) IMultiBlock(micdoodle8.mods.galacticraft.core.tile.IMultiBlock)

Example 12 with IMultiBlock

use of micdoodle8.mods.galacticraft.core.tile.IMultiBlock in project MorePlanets by SteveKunG.

the class TileEntityDummy method onBlockRemoval.

public void onBlockRemoval() {
    if (this.mainBlockPosition != null) {
        TileEntity tileEntity = this.world.getTileEntity(this.mainBlockPosition);
        if (tileEntity instanceof IMultiBlock) {
            IMultiBlock mainBlock = (IMultiBlock) tileEntity;
            mainBlock.onDestroy(this);
        }
    }
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) IMultiBlock(micdoodle8.mods.galacticraft.core.tile.IMultiBlock)

Aggregations

TileEntity (net.minecraft.tileentity.TileEntity)12 IMultiBlock (micdoodle8.mods.galacticraft.core.tile.IMultiBlock)11 BlockPos (net.minecraft.util.BlockPos)3 ArrayList (java.util.ArrayList)2 LinkedList (java.util.LinkedList)2 Block (net.minecraft.block.Block)2 IBlockState (net.minecraft.block.state.IBlockState)2 ItemStack (net.minecraft.item.ItemStack)2 IPartialSealableBlock (micdoodle8.mods.galacticraft.api.block.IPartialSealableBlock)1 BlockMulti (micdoodle8.mods.galacticraft.core.blocks.BlockMulti)1 EntityHangingSchematic (micdoodle8.mods.galacticraft.core.entities.EntityHangingSchematic)1 TileEntityCargoLoader (micdoodle8.mods.galacticraft.core.tile.TileEntityCargoLoader)1 TileEntityCrafting (micdoodle8.mods.galacticraft.core.tile.TileEntityCrafting)1 TileEntityEnergyStorageModule (micdoodle8.mods.galacticraft.core.tile.TileEntityEnergyStorageModule)1 TileEntityFluidTank (micdoodle8.mods.galacticraft.core.tile.TileEntityFluidTank)1 EnumSortCategoryBlock (micdoodle8.mods.galacticraft.core.util.EnumSortCategoryBlock)1 ITileEntityProvider (net.minecraft.block.ITileEntityProvider)1 EntityItem (net.minecraft.entity.item.EntityItem)1 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)1 TileEntityBrewingStand (net.minecraft.tileentity.TileEntityBrewingStand)1