@Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { final boolean CASCADE_UPDATE = false; // I'm not sure what this flag does, but vanilla always sets it to false // except for calls by World.setBlockState() worldIn.notifyNeighborsOfStateChange(pos, this, CASCADE_UPDATE); super.breakBlock(worldIn, pos, state); }
@Override public void breakBlock(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state) { dropItem(world, pos); super.breakBlock(world, pos, state); }
@Override public void breakBlock(World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state) { TileEntity tile = worldIn.getTileEntity(pos); if (tile instanceof LogisticsSolidTileEntity) { ((LogisticsSolidTileEntity) tile).onBlockBreak(); } super.breakBlock(worldIn, pos, state); }
@Override public void breakBlock(World world, BlockPos pos, IBlockState state) { if (hasTileEntity(state)) { WorldTools.getTile(world, pos, IBlockBreakHandler.class).ifPresent(IBlockBreakHandler::onBlockBroken); } super.breakBlock(world, pos, state); } }
@Override public void breakBlock(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state) { TileEntity tile = world.getTileEntity(pos); if (tile != null) { IItemHandler inv = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); WorldHelper.dropInventory(inv, world, pos); } super.breakBlock(world, pos, state); }
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { super.breakBlock(worldIn, pos, state); worldIn.removeTileEntity(pos); final boolean CASCADE_UPDATE = false; // I'm not sure what this flag does, but vanilla always sets it to false // except for calls by World.setBlockState() worldIn.notifyNeighborsOfStateChange(pos, this, CASCADE_UPDATE); }
@Override public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TileAltar) ((TileAltar) tile).dropItems(); super.breakBlock(world, blockPos, blockState); }
@Override public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { if (world.isRemote == false) { GhostElement element = getElement(world, x, y, z); if (element != null) element.breakBlock(); } super.breakBlock(world, x, y, z, par5, par6); }
@Override public void breakBlock(World world, BlockPos pos, IBlockState state) { InventoryUtil.dropTileEntityInventoryItems(world, pos, world.getTileEntity(pos)); super.breakBlock(world, pos, state); }
@Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { TEIngotPile te = Helpers.getTE(worldIn, pos, TEIngotPile.class); if (te != null) te.onBreakBlock(); super.breakBlock(worldIn, pos, state); }
@Override public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { TileIncenseAltar TileIncenseAltar = (TileIncenseAltar) world.getTileEntity(blockPos); if (TileIncenseAltar != null) TileIncenseAltar.dropItems(); super.breakBlock(world, blockPos, blockState); }
@Override public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { TileDemonCrucible tile = (TileDemonCrucible) world.getTileEntity(blockPos); if (tile != null) tile.dropItems(); super.breakBlock(world, blockPos, blockState); }
@Override public void breakBlock (World worldIn, BlockPos pos, IBlockState state) { final TileEntity tile = worldIn.getTileEntity(pos); if (tile instanceof TileEntityBasic) { ((TileEntityBasic) tile).onTileRemoved(worldIn, pos, state); } super.breakBlock(worldIn, pos, state); worldIn.removeTileEntity(pos); }
@Override public void breakBlock(World world, BlockPos pos, IBlockState state) { world.playEvent(2001, pos, Block.getStateId(Blocks.STONE.getDefaultState())); super.breakBlock(world, pos, state); }
@Override public void breakBlock(final World world, final BlockPos pos, final IBlockState state) { final TileEntity tileentity = world.getTileEntity(pos); if (tileentity instanceof TileEntityCasing) { InventoryHelper.dropInventoryItems(world, pos, (TileEntityCasing) tileentity); world.updateComparatorOutputLevel(pos, this); } super.breakBlock(world, pos, state); }
@Override public void breakBlock(World world, BlockPos pos, IBlockState state) { super.breakBlock(world, pos, state); if (!world.isRemote) { world.notifyNeighborsOfStateChange(pos, this, true); world.notifyNeighborsOfStateChange(pos.down(), this, true); } }
@Override public void breakBlock(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state) { TileEntity tileentity = world.getTileEntity(pos); IItemHandler itemHandler = tileentity.getCapability(ITEM_HANDLER_CAPABILITY, null); if (itemHandler != null) { InventoryHelper.spawnItemStack(world, pos.getX(), pos.getY(), pos.getZ(), itemHandler.getStackInSlot(0)); } super.breakBlock(world, pos, state); }
@Override public void breakBlock(World world, BlockPos pos, IBlockState state) { TileEntityItemMortar tileentitymortar = (TileEntityItemMortar) world.getTileEntity(pos); if (tileentitymortar != null) { InventoryHelper.dropInventoryItems(world, pos, tileentitymortar); world.updateComparatorOutputLevel(pos, state.getBlock()); } super.breakBlock(world, pos, state); }
@Override public void breakBlock(World world, BlockPos pos, IBlockState state) { // No need to break the Thumper itself because that is handled by BlockThumper#neighborChanged. for (int i = -1; i < 1; i++) { BlockPos next = pos.up(i); if (world.getBlockState(next).getBlock() == this) { world.setBlockToAir(next); } } super.breakBlock(world, pos, state); }
@Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileAutoChisel) { TileAutoChisel autochisel = (TileAutoChisel) tileentity; dumpItems(worldIn, pos, autochisel.getInputInv()); dumpItems(worldIn, pos, autochisel.getOtherInv()); dumpItems(worldIn, pos, autochisel.getOutputInv()); worldIn.updateComparatorOutputLevel(pos, this); } super.breakBlock(worldIn, pos, state); }