Minecraft Blogs / Tutorial

[Updated] McExtract - Minecraft assets file extractor

  • 3,773 views, 1 today
  • 2
  • 2
  • 6
Apis035 avatar Apis035
Level 36 : Artisan Miner
4
McExtract is a batch script tool for extracting Minecraft's assets files. If you wanted to see the source of files in the assets folder or you need Minecraft sound/music for something, you don't need to download hundreads mb of file from internet. With this little batch script, you can get all these sounds only from your computer that has minecraft installed.

Here is the script:

Spoiler - click to reveal
@echo off
set "t=%~n0"
set "p=%appdata%\.minecraft\assets"
set "f=%p%\indexes\1.12.json"
cd "%p%"
title %t% ^| Apis035
setlocal enabledelayedexpansion
findstr "./.* pa.*" "%f%">a
findstr "\<has.*" "%f%">b
for /f "tokens=*" %%# in (a) do (set l=%%#
echo !l:~1,-4!>>c)
for /f "tokens=*" %%# in (b) do (set l=%%#
echo !l:~9,-2!>>d)
for /f "tokens=*" %%# in (c) do (set /a e+=1
set f!e!=%%#)
set g=!e!
for /f "tokens=*" %%# in (d) do (set /a k+=1
set h!k!=%%#)
del a b c d
for /l %%# in (1,1,!g!) do (echo %%#/!g!
set i=!h%%#!
set "i=%p%\objects\!i:~,2!\!i!"
set j=!f%%#!
set "j=%~dpn0\!j:/=\!"
call :a "!j!"
copy "!i!" "!j!">nul)
pause
exit
:a
md "%~dp1">nul 2>&1

How to use it:
  1. Copy the script in the spoiler
  2. Open notepad and paste the script
  3. Click file>save as
  4. Rename it: McExtract.bat
  5. Set the save type to all files
  6. Select the place where you want to save it and press save (save it on desktop)
  7. Double click the saved file. It should be opened with command prompt
  8. Wait while it working. Files will be saved in folder with same name (McExtract)

After it has been finished work, you can get the files in McExtract folder. Enjoy the source files, or use it for making a custom sounds resource pack. To extract asset from different minecraft version, change the number that colored in red. (1.8 1.9 1.10 1.11) If your antivirus detect this as virus, temporarily turn it off. This script is harmless.

[update] I just upgraded my laptop to windows 8.1, and when I tested it again, the script is causing errors. So I updated it to able to run on 8.1 and maybe on 10. Hopefully this script doesn't cause any more problems.

Tested with Windows 7 Professional 32-bit and Windows 8.1 Pro 64-bit
(Might be problem on other windows version)
Tags

Create an account or sign in to comment.

1
03/08/2019 6:21 am
Level 1 : New Miner
Cha0sPudd1ng
Cha0sPudd1ng avatar
Hello, nice Script.
But i got a problem. In the Screen says that it can't find the file c and d.

I have Win10 Pro 64bit (10.0.16299).
1
05/22/2019 7:48 am
Level 36 : Artisan Miner
Apis035
Apis035 avatar
i didn't test this on windows 10, back in 2017 i dont have any computer with windows 10 os. i'll try to fix it
1
07/10/2018 5:48 pm
Level 49 : Master Architect
BottleRocketBosley
BottleRocketBosley avatar
This is amazing!!! I can't believe it actually worked! This is the best thing I have ever used!
1
05/22/2019 7:47 am
Level 36 : Artisan Miner
Apis035
Apis035 avatar
i wasted 1 month to make this script. thanks for using it ^^
1
05/29/2018 12:37 am
Level 1 : New Miner
v22raptor
v22raptor avatar
I just created an account to thank you for this script. It works on Windows 10 (ver. 1703).
1
05/22/2019 7:46 am
Level 36 : Artisan Miner
Apis035
Apis035 avatar
haha glad it works for you ^^
Planet Minecraft

Website

© 2010 - 2023
www.planetminecraft.com

Welcome