@Override public void breakBlock(World world, @Nonnull BlockPos pos, @Nonnull IBlockState state) { TileEntity tile = world.getTileEntity(pos); if(tile instanceof ISonarInventoryTile){ List<ItemStack> stacks = ((ISonarInventoryTile) tile).inv().getDrops(); for (ItemStack itemstack : stacks){ if (!itemstack.isEmpty()){ InventoryHelper.spawnItemStack(world, pos.getX(), pos.getY(), pos.getZ(), itemstack); } } } super.breakBlock(world, pos, state); }