Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting up MCP for newer versions (e.g. 1.12.2)

It's possible to use create an MCP installation for versions of Minecraft where there hasn't been a full MCP release. It takes a little bit of manual setup, but the end result is highly useful.

  1. Download and extract the most recent MCP build from http://www.modcoderpack.com/. (Currently, the latest build is http://www.modcoderpack.com/files/mcp940.zip)

  2. Edit version.cfg in the conf folder, and change ClientVersion and ServerVersion to the version you want (for instance, 1.12.2).

  3. Download the SRG zip for the version you want; these can generally be found at http://mcpbot.bspk.rs/mcp/<version>/mcp-<version>-srg.zip (for example, http://mcpbot.bspk.rs/mcp/1.11.2/mcp-1.11.2-srg.zip) or at http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/<version>/mcp-<version>-srg.zip (for example, http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip). (For 1.12.1 and 1.12.2, only the minecraftforge link works)

  4. Extract that zip into the MCP conf folder, overwriting files and the contents of the patches folder.

  5. Download the latest daily mappings from http://export.mcpbot.bspk.rs/. Even if they aren't for exactly the version you want, they will generally work.

  6. Extract the mapping zip into the MCP conf folder, overwriting files.

  7. Run MCP's decompile.bat as you normally would.

Note that for this to work, there must be a released SRG file for the version you want. The SRG file is what converts obfuscated names into an intermediate step where names are (mostly) the same between versions; the mappings files convert those intermediate names into the names you see and are used to.

Note that as always, the MCP license applies, even for development builds. Please read the LICENSE.txt included with MCP for more information about what you are and are not permitted to do.

An additional note: if you're using eclipse, you will need to manually fiddle with build paths due to updated libraries. You will also need to attach the native libraries, found in jars/versions/${VERSION}/${VERSION}-natives, to the libraries (e.g. LWJGL) for the game to launch.

@terroe64

This comment has been minimized.

Copy link

terroe64 commented Oct 6, 2017

Can you give me a hand with this, I'm trying to get a version of MCP 1.12.2 just like in the example, however whenever I finish decompiling it all I end up with a broken build path, the library manager in eclipse says that the MC 1.12 jar file is missing so I've tried adding in the 1.12.2 jar file, but when I do that the game crashes on boot. If you're willing to help me out I'd really appreciate it.
Thanks in advance :)

@Pokechu22

This comment has been minimized.

Copy link
Owner Author

Pokechu22 commented Oct 11, 2017

@terroe64 - if you're using eclipse you need to link the natives as well - they're found in versions/1.12.2/1.12.2-natives; if you attach that folder to e.g. lwjgl everything should work.

@terroe64

This comment has been minimized.

Copy link

terroe64 commented Nov 4, 2017

@Pokechu22 - What do you mean by attach? also should I be using the versions folder from a .minecraft directory or the one in the MCP folder?

@terroe64

This comment has been minimized.

Copy link

terroe64 commented Nov 4, 2017

@Pokechu22 - OH SHIT NEVERMIND FIGURED IT OUT THANK YOU YOU'RE THE BEST !

@symvizan

This comment has been minimized.

Copy link

symvizan commented Jan 13, 2018

Hi! When I start to run Minecraft from eclipse it says Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl64 in java.library.path

@Pokechu22

This comment has been minimized.

Copy link
Owner Author

Pokechu22 commented Jan 22, 2018

@symvizan You need to link natives... as I mentioned above.

@DragonVortex

This comment has been minimized.

Copy link

DragonVortex commented Jan 24, 2018

Just to let anyone know, If you are getting errors when decompiling, make sure that you are using this version of java instead of Java SE 9.0.4.

@tigerdan2

This comment has been minimized.

Copy link

tigerdan2 commented Mar 3, 2018

I just followed your tutorial step by step
"ERROR:root:FATAL ERROR
Traceback (most recent call last):
File "runtime\decompile.py", line 61, in decompile
commands = Commands(conffile, verify=True, no_patch=no_patch, workdir=workdir, json=json)
File "E:\DarkSun\runtime\commands.py", line 178, in init
normalStart = self.readconf(workdir, json)
File "E:\DarkSun\runtime\commands.py", line 491, in readconf
self.versionClient, self.versionServer = self.getVersions()
TypeError: 'NoneType' object is not iterable
"
and got this lovely error message right when i run decompile.bat
do you know what i might be doing wrong?

@yarala1

This comment has been minimized.

Copy link

yarala1 commented Mar 27, 2018

Need help

== MCP 9.40 (data: 9.40, client: 1.12.2, server: 1.12.2) ==
"scalac" is not found on the PATH. Scala files will not be recompiled

found ff, ff patches, srgs, name csvs, doc csvs, param csvs, astyle, astyle co

nfig, rg, ss
!! Modified jar detected. Unpredictable results !!
!! client already decompiled. Run cleanup before decompiling again !!
!! Missing server jar file. Aborting !!
Press any key to continue . . .

@Marcono1234

This comment has been minimized.

Copy link

Marcono1234 commented Apr 4, 2018

@nedal235

This comment has been minimized.

Copy link

nedal235 commented Apr 22, 2018

I have a problem can anyone help;?

== MCP 9.40 (data: 9.40, client: 1.12.2, server: 1.12.2) ==
"scalac" is not found on the PATH. Scala files will not be recompiled

found ff, ff patches, srgs, name csvs, doc csvs, param csvs, astyle, astyle config, rg, ss

!! Modified jar detected. Unpredictable results !!
== Decompiling client using fernflower ==

Creating SRGs
Applying SpecialSource
Applying MCInjector
Creating renamed srg
Filtering classes
Decompiling
'"C:\Program Files (x86)\Java\jdk1.8.0_161\bin\java" -jar runtime\bin\fernflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=TRACE "-e=jars\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\com/ibm/icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar" "-e=jars\libraries\org/apache/httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-api\2.8.1\log4j-api-2.8.1.jar" "-e=jars\libraries\org/apache/commons\commons-lang3\3.5\commons-lang3-3.5.jar" "-e=jars\libraries\net/java/dev/jna\jna\4.4.0\jna-4.4.0.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar" "-e=jars\libraries\com/paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar" "-e=jars\libraries\net/sf/jopt-simple\jopt-simple\5.0.3\jopt-simple-5.0.3.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3.jar" "-e=jars\libraries\com/google/guava\guava\21.0\guava-21.0.jar" "-e=jars\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar" "-e=jars\libraries\org/apache/httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar" "-e=jars\libraries\org/apache/commons\commons-compress\1.8.1\commons-compress-1.8.1.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3-natives-windows.jar" "-e=jars\libraries\it/unimi/dsi\fastutil\7.1.0\fastutil-7.1.0.jar" "-e=jars\libraries\net/java/dev/jna\platform\3.4.0\platform-3.4.0.jar" "-e=jars\libraries\com/paulscode\codecjorbis\20101023\codecjorbis-20101023.jar" "-e=jars\libraries\com/paulscode\soundsystem\20120107\soundsystem-20120107.jar" "-e=jars\libraries\com/paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl_util\2.9.4-nightly-20150209\lwjgl_util-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-codec\commons-codec\1.10\commons-codec-1.10.jar" "-e=jars\libraries\net/java/jutils\jutils\1.0.0\jutils-1.0.0.jar" "-e=jars\libraries\com/mojang\patchy\1.1\patchy-1.1.jar" "-e=jars\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl\2.9.4-nightly-20150209\lwjgl-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-io\commons-io\2.5\commons-io-2.5.jar" "-e=jars\libraries\com/mojang\realms\1.10.19\realms-1.10.19.jar" "-e=jars\libraries\com/mojang\authlib\1.5.25\authlib-1.5.25.jar" "-e=jars\libraries\com/google/code/gson\gson\2.8.0\gson-2.8.0.jar" "-e=jars\libraries\net/java/jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar" "-e=jars\libraries\com/paulscode\codecwav\20101023\codecwav-20101023.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-core\2.8.1\log4j-core-2.8.1.jar" "-e=jars\libraries\io/netty\netty-all\4.1.9.Final\netty-all-4.1.9.Final.jar" temp/minecraft_ff_in.jar temp\src\minecraft' failed : 1
Decompile failed
Press any key to continue . . .

@AlexTron7

This comment has been minimized.

Copy link

AlexTron7 commented Apr 26, 2018

@Pokechu22 can you explain the eclipse thing in more simple terms?

@Hi-ImKyle

This comment has been minimized.

Copy link

Hi-ImKyle commented Apr 27, 2018

This works fine but I can't seem to run MCP in Eclipse via Debug

EDIT: I got it! Thanks.

@Davosaurus

This comment has been minimized.

Copy link

Davosaurus commented May 15, 2018

@tigerdan2 I am having the same exact issue. Did you ever find a fix?

Does anyone else have any solutions for the fatal error when decompiling?

@AlexTron7

This comment has been minimized.

Copy link

AlexTron7 commented May 22, 2018

Can someone explain where the libraries are that i need to connect the natives to.

@Ufiestar

This comment has been minimized.

Copy link

Ufiestar commented May 26, 2018

Delete the patches folder first! Else you get nasty compile errors!

@Markop1CZ

This comment has been minimized.

Copy link

Markop1CZ commented Jun 15, 2018

It decompiles fine, but when I run the code, I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl64 in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.lwjgl.Sys$1.run(Sys.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:87)
at org.lwjgl.Sys.(Sys.java:117)
at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:3300)
at net.minecraft.client.main.Main.main(Main.java:39)
at Start.main(Start.java:11)
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

@ramidzkh

This comment has been minimized.

Copy link

ramidzkh commented Jul 14, 2018

Thanks! This works just right decompiling and editing 1.12.2 with MCP 940 and also IntelliJ IDEA (2018.2)

@mkdsk

This comment has been minimized.

Copy link

mkdsk commented Jul 18, 2018

This method should work with 1.13 also right?

@ghost

This comment has been minimized.

Copy link

ghost commented Jul 18, 2018

kurwa nei dziala na 1.13 jebany kasztanie z angli

@xfl03

This comment has been minimized.

Copy link

xfl03 commented Jul 25, 2018

How can this work with 1.13?

@JReichwein

This comment has been minimized.

Copy link

JReichwein commented Jul 25, 2018

getting this while decompiling:

Decompiling
'"C:\Program Files (x86)\Java\jdk1.8.0_181\bin\java" -Xmx2G -jar runtime\bin\fer
nflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=TRACE "-e=jars
\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\com
/ibm/icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar" "-e=jars\libraries\o
rg/apache/httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar" "-e=jars\libraries\o
rg/apache/logging/log4j\log4j-api\2.8.1\log4j-api-2.8.1.jar" "-e=jars\libraries
org/apache/commons\commons-lang3\3.5\commons-lang3-3.5.jar" "-e=jars\libraries\n
et/java/dev/jna\jna\4.4.0\jna-4.4.0.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjg
l-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives-
windows.jar" "-e=jars\libraries\com/paulscode\libraryjavasound\20101123\libraryj
avasound-20101123.jar" "-e=jars\libraries\net/sf/jopt-simple\jopt-simple\5.0.3\j
opt-simple-5.0.3.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2spee
ch-1.10.3.jar" "-e=jars\libraries\com/google/guava\guava\21.0\guava-21.0.jar" "-
e=jars\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar" "-e=jars\librarie
s\org/apache/httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar" "-e=jars\libr
aries\org/apache/commons\commons-compress\1.8.1\commons-compress-1.8.1.jar" "-e=
jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3-natives-windows.
jar" "-e=jars\libraries\it/unimi/dsi\fastutil\7.1.0\fastutil-7.1.0.jar" "-e=jars
\libraries\net/java/dev/jna\platform\3.4.0\platform-3.4.0.jar" "-e=jars\librarie
s\com/paulscode\codecjorbis\20101023\codecjorbis-20101023.jar" "-e=jars\librarie
s\com/paulscode\soundsystem\20120107\soundsystem-20120107.jar" "-e=jars\librarie
s\com/paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar" "-e
=jars\libraries\org/lwjgl/lwjgl\lwjgl_util\2.9.4-nightly-20150209\lwjgl_util-2.9
.4-nightly-20150209.jar" "-e=jars\libraries\commons-codec\commons-codec\1.10\com
mons-codec-1.10.jar" "-e=jars\libraries\net/java/jutils\jutils\1.0.0\jutils-1.0.
0.jar" "-e=jars\libraries\com/mojang\patchy\1.1\patchy-1.1.jar" "-e=jars\librari
es\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar" "-e=jars\lib
raries\org/lwjgl/lwjgl\lwjgl\2.9.4-nightly-20150209\lwjgl-2.9.4-nightly-20150209
.jar" "-e=jars\libraries\commons-io\commons-io\2.5\commons-io-2.5.jar" "-e=jars
libraries\com/mojang\realms\1.10.22\realms-1.10.22.jar" "-e=jars\libraries\com/m
ojang\authlib\1.5.25\authlib-1.5.25.jar" "-e=jars\libraries\com/google/code/gson
\gson\2.8.0\gson-2.8.0.jar" "-e=jars\libraries\net/java/jinput\jinput-platform\2
.0.5\jinput-platform-2.0.5-natives-windows.jar" "-e=jars\libraries\com/paulscode
\codecwav\20101023\codecwav-20101023.jar" "-e=jars\libraries\org/apache/logging/
log4j\log4j-core\2.8.1\log4j-core-2.8.1.jar" "-e=jars\libraries\io/netty\netty-a
ll\4.1.9.Final\netty-all-4.1.9.Final.jar" temp/minecraft_ff_in.jar temp\src\mine
craft' failed : 1
Decompile failed
Press any key to continue . . .

to everyone having this issue, I've fixed this:
basically, the decompiler is running out of memory. Make sure you have only the x64 verson of Java 8, and that your JAVA_HOME variable is set to the jdk on your system.

@wisys

This comment has been minimized.

Copy link

wisys commented Jul 26, 2018

@JReichwein I am having the same issue, although I do have my JAVA_HOME environment variable set to the JDK and have tried appending -Xincgc -Xms4G -Xmx4G in the Fernflower cmd after java is ran in conf/mcp.cfg . . . but it still has not been able to decompile.

Did I perhaps do something wrongly or could you maybe provide your insight on how you fixed the issue? Any help will be greatly appreciated, thanks again.

@Jiggleton

This comment has been minimized.

Copy link

Jiggleton commented Jul 28, 2018

Mine outputs no error but there's nothing but the eclipse files like .project in the Client and Server (i.e no src/didn't decompile)

@JReichwein I have the exact same Java version, I'm 64-bit, but I got nothing but this in my eclipse folder:
image

MCP Log: https://hastebin.com/uhuzecotem.shell

@TheMCNerd2017

This comment has been minimized.

Copy link

TheMCNerd2017 commented Aug 22, 2018

I downloaded the wrong version of the JDK(I assume Version 10 since the folders were like 10.x) previously before I read this guide. Now I am downloading the JDK 8 through a link another person posted in the comments on this page. Should I uninstall the previous version of the JDK, or can I keep both of them?

EDIT: Didn't even matter, as it used the JDK 8 that I installed. Needless to say, the program never works, spitting out 100 warnings and 8 errors.

@ThomasBeckham

This comment has been minimized.

Copy link

ThomasBeckham commented Aug 23, 2018

i am getting a scalac error

== MCP 9.40 (data: 9.40, client: 1.12.2, server: 1.12.2) ==
== Recompiling client ==

Cleaning bin
Recompiling
'"scalac" -encoding UTF-8 -deprecation -target:jvm-1.8 -classpath "jars/versions/1.12.2/1.12.2.jar:lib:lib/*:jars/libraries/com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.jar:jars/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:jars/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:jars/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:jars/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:jars/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:jars/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:jars/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar:jars/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:jars/libraries/com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar:jars/libraries/com/google/guava/guava/21.0/guava-21.0.jar:jars/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:jars/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:jars/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:jars/libraries/it/unimi/dsi/fastutil/7.1.0/fastutil-7.1.0.jar:jars/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:jars/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar:jars/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar:jars/libraries/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar:jars/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar:jars/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar:jars/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:jars/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:jars/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:jars/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:jars/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar:jars/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:jars/libraries/com/mojang/realms/1.10.22/realms-1.10.22.jar:jars/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:jars/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:jars/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar:jars/libraries/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar:jars/libraries/com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-linux.jar:jars/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:jars/libraries/io/netty/netty-all/4.1.9.Final/netty-all-4.1.9.Final.jar" -sourcepath src/minecraft -d bin/minecraft @temp/java_src_client.txt @temp/scala_src_client.txt' failed : 1

== ERRORS FOUND in SCALA CODE ==

scalac error: 'jvm-1.8' is not a valid choice for '-target'
scalac -help gives more information
scalac error: bad option: '-target:jvm-1.8'
scalac -help gives more information

Client recompile failed, correct source then rerun updatemd5
!! Can not find server sources, try decompiling !!

i have no clue how to fix it doesn't seem like any one is having the same problem

@ProDev2

This comment has been minimized.

Copy link

ProDev2 commented Sep 18, 2018

Here is a quick tutorial about how to set this up:
https://youtu.be/5P6dp6KGus0

*I think Markop1CZ forgot to add the Native library to the minecraft jar after replacing it with a newer version. Because I also made that mistake at first.

@FAKE1007

This comment has been minimized.

Copy link

FAKE1007 commented Dec 14, 2018

Oh my god, how do I fix this?!
The JAR file lwjgl-2.9.4-nightly-20150209.jar has no source attachment.
I tried everything. I tried to put src.zip there, I tried to put sources.jar there, nothing is working!
ABSOULUTELY NOTHING! HELP!!!!

FIX FOUND!

I did something wrong and the 1.12.2 jar library was with 1.12 natives.
Fixed it easy.

@axfadedxshadow

This comment has been minimized.

Copy link

axfadedxshadow commented Dec 28, 2018

So i did everything that you said to do and now i have a lot of warnings

Description Resource Path Location Type
Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment. Client Build path JRE System Library Problem
Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment. Server Build path JRE System Library Problem
The enum constant ADD needs a corresponding case label in this enum switch on SPacketUpdateBossInfo.Operation BossInfoClient.java /Client/src/net/minecraft/client/gui line 40 Java Problem
The enum constant BLEND_WEIGHT needs a corresponding case label in this enum switch on VertexFormatElement.EnumUsage WorldVertexBufferUploader.java /Client/src/net/minecraft/client/renderer line 27 Java Problem
The enum constant BLEND_WEIGHT needs a corresponding case label in this enum switch on VertexFormatElement.EnumUsage WorldVertexBufferUploader.java /Client/src/net/minecraft/client/renderer line 61 Java Problem
The enum constant IGNORE needs a corresponding case label in this enum switch on EnumPushReaction BlockPistonBase.java /Client/src/net/minecraft/block line 345 Java Problem
The enum constant MATRIX needs a corresponding case label in this enum switch on VertexFormatElement.EnumUsage WorldVertexBufferUploader.java /Client/src/net/minecraft/client/renderer line 27 Java Problem
The enum constant MATRIX needs a corresponding case label in this enum switch on VertexFormatElement.EnumUsage WorldVertexBufferUploader.java /Client/src/net/minecraft/client/renderer line 61 Java Problem
The enum constant NORMAL needs a corresponding case label in this enum switch on EnumPushReaction BlockPistonBase.java /Client/src/net/minecraft/block line 345 Java Problem
The enum constant PADDING needs a corresponding case label in this enum switch on VertexFormatElement.EnumUsage WorldVertexBufferUploader.java /Client/src/net/minecraft/client/renderer line 27 Java Problem
The enum constant PADDING needs a corresponding case label in this enum switch on VertexFormatElement.EnumUsage WorldVertexBufferUploader.java /Client/src/net/minecraft/client/renderer line 61 Java Problem
The enum constant REMOVE needs a corresponding case label in this enum switch on SPacketUpdateBossInfo.Operation BossInfoClient.java /Client/src/net/minecraft/client/gui line 40 Java Problem
Unlikely argument type ResourceLocation for get(Object) on a Map<String,TextureAtlasSprite> TextureMap.java /Client/src/net/minecraft/client/renderer/texture line 292 Java Problem

  • [ ]

  • Any fix?

@lineardependent

This comment has been minimized.

Copy link

lineardependent commented Jan 22, 2019

Still works perfectly for newer versions. Thanks.

@R0X0RE0

This comment has been minimized.

Copy link

R0X0RE0 commented Feb 26, 2019

Even when downgrading Java, I still get TypeError: 'NoneType' object is not iterable

@ramidzkh

This comment has been minimized.

Copy link

ramidzkh commented Apr 16, 2019

If you want this to work with 1.13+ you need to create or find a program that can convert from TSRG files to SRG files. The TSRG files can be found here. You will also need to copy the patch and inject folders.

EDIT: When you copy the patch and inject folders make sure they take the same structure of the format in your original MCP download.
EDIT: You will also need to remove the directories in the new patch files and make it use the same name format.
EDIT: You can use the createSrg task in MCPConfig to create the SRG file. To condense the patch files into the old format I used

for f in `find net -type f`;
do cat "${f}" > "$(echo "${f}" | sed s/\//./g)";
done;

EDIT: The above script is in bash syntax.

and copied them into their respective folders.

@OpticFusion1

This comment has been minimized.

Copy link

OpticFusion1 commented May 1, 2019

@ramidzkh You should probably make a completely different gist that goes into more detail

@0xx06

This comment has been minimized.

Copy link

0xx06 commented May 8, 2019

To condense the patch files into the old format I used

for f in find net -type f;
do cat "${f}" > "$(echo "${f}" | sed s///./g)";
done;

and copied them into their respective folders.

I got it all working so far but for real i have no idea how to get the patches folder in the correct format. That code snippet doesn't tell me anything and i've been on this for hours now ...

@ramidzkh i tried powershell and batch and that code snippet does nothing. also the new patches folder is missing quite some .patch'es that the 1.12.2 config has

Edit: So I tried following ramid's steps, but those were a bit off reality. FIRST OFF: It doesn't work, but here are the real step nonetheless:

  1. Get the mappings from mcpbot (1.13.2)

  2. To get the SRGs you actually have to clone the mcpconfic repo he linked

  3. delete all folders from "version" apart from the one you want (in this case 1.13.2)

  4. go into the mcpconfig root folder, open cmd and type in 'gradlew assemble' and let it do its thing

  5. you will find your .srg and the patches/inject folder then in mcpconfig/build/versions/

  6. the patches / inject folders are in the wrong format, you have to find a way to rename each file in all subcategories of the patches folder to the following format:

  7. Example (!!) folder structure: net->minecraft->block->BlockState.java.patch
    in the end the .patch file has to be named net.minecraft.block.BlockState.java.patch

  8. This has to be done for EACH file in every subdirectory of the patches folder. I used a tool named "bulk renamer" and fiddled with the settings. You can append folder names with a separator easily.

  9. You then have to bring the patches folder into the correct format (just compare to public srg releases) and get all files from every subfolder to the folders you have named minecraft_ff etc. (i used cmd commands).

  10. put inject folder into patches folder and fix the folder structure to be like previous SRG releases.

That's it. If you try to use it with mcp it won't work because files are missing (for example the joined file which isn't srg and others). But maybe someone else can make further progress with the aid of my steps.

@S-B99

This comment has been minimized.

Copy link

S-B99 commented May 16, 2019

It asks to run 1.12. I am assuming it's going to work, but it does not use 1.12.2 minecraft to decompile, rather 1.12, is that correct?

Edit: I did it wrong, forgot to save version file

@flewkey

This comment has been minimized.

Copy link

flewkey commented May 23, 2019

Hello, I'm not here to contribute anything in terms of updating older versions of MCP to later versions. However, if your only goal is to decompile and modify the game, I definitely recommend looking at this guide. https://gist.github.com/Earthcomputer/afe6f6da5eb8d93a2cb4aec453d6b912
If you want to use MCP mappings, I doubt it would be hard to do.

@FurkanDGN

This comment has been minimized.

Copy link

FurkanDGN commented May 26, 2019

Getting this while compiling:

19:36:19 - Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 10, Size: 9 19:36:19 - at java.util.ArrayList.rangeCheck(ArrayList.java:657) 19:36:19 - at java.util.ArrayList.get(ArrayList.java:433) 19:36:19 - at org.jetbrains.java.decompiler.struct.consts.ConstantPool.getConstant(ConstantPool.java:183) 19:36:19 - at org.jetbrains.java.decompiler.struct.consts.ConstantPool.getPrimitiveConstant(ConstantPool.java:187) 19:36:19 - at org.jetbrains.java.decompiler.struct.consts.PrimitiveConstant.resolveConstant(PrimitiveConstant.java:80) 19:36:19 - at org.jetbrains.java.decompiler.struct.consts.ConstantPool.<init>(ConstantPool.java:109) 19:36:19 - at org.jetbrains.java.decompiler.struct.StructClass.<init>(StructClass.java:84) 19:36:19 - at org.jetbrains.java.decompiler.struct.StructClass.<init>(StructClass.java:72) 19:36:19 - at org.jetbrains.java.decompiler.struct.StructContext.addArchive(StructContext.java:159) 19:36:19 - at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:100) 19:36:19 - at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:78) 19:36:19 - at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.addSpace(ConsoleDecompiler.java:130) 19:36:19 - at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.main(ConsoleDecompiler.java:93) 19:36:19 - '"C:\Program Files\Java\jdk1.8.0_191\bin\java" -jar runtime\bin\fernflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=TRACE "-e=jars\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\org/lwjgl\lwjgl-stb\3.1.6\lwjgl-stb-3.1.6.jar" "-e=jars\libraries\com/ibm/icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar" "-e=jars\libraries\org/apache/httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-api\2.8.1\log4j-api-2.8.1.jar" "-e=jars\libraries\org/apache/commons\commons-lang3\3.5\commons-lang3-3.5.jar" "-e=jars\libraries\org/lwjgl\lwjgl\3.1.6\lwjgl-3.1.6-natives-windows.jar" "-e=jars\libraries\net/java/dev/jna\jna\4.4.0\jna-4.4.0.jar" "-e=jars\libraries\com/paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar" "-e=jars\libraries\net/sf/jopt-simple\jopt-simple\5.0.3\jopt-simple-5.0.3.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3.jar" "-e=jars\libraries\com/mojang\datafixerupper\1.0.19\datafixerupper-1.0.19.jar" "-e=jars\libraries\com/google/guava\guava\21.0\guava-21.0.jar" "-e=jars\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar" "-e=jars\libraries\org/lwjgl\lwjgl-jemalloc\3.1.6\lwjgl-jemalloc-3.1.6.jar" "-e=jars\libraries\org/apache/httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar" "-e=jars\libraries\org/apache/commons\commons-compress\1.8.1\commons-compress-1.8.1.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3-natives-windows.jar" "-e=jars\libraries\it/unimi/dsi\fastutil\8.2.1\fastutil-8.2.1.jar" "-e=jars\libraries\net/java/dev/jna\platform\3.4.0\platform-3.4.0.jar" "-e=jars\libraries\com/paulscode\codecjorbis\20101023\codecjorbis-20101023.jar" "-e=jars\libraries\com/paulscode\soundsystem\20120107\soundsystem-20120107.jar" "-e=jars\libraries\commons-codec\commons-codec\1.10\commons-codec-1.10.jar" "-e=jars\libraries\net/java/jutils\jutils\1.0.0\jutils-1.0.0.jar" "-e=jars\libraries\com/mojang\patchy\1.1\patchy-1.1.jar" "-e=jars\libraries\org/lwjgl\lwjgl-opengl\3.1.6\lwjgl-opengl-3.1.6.jar" "-e=jars\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar" "-e=jars\libraries\org/lwjgl\lwjgl-jemalloc\3.1.6\lwjgl-jemalloc-3.1.6-natives-windows.jar" "-e=jars\libraries\org/lwjgl\lwjgl-glfw\3.1.6\lwjgl-glfw-3.1.6.jar" "-e=jars\libraries\com/mojang\brigadier\1.0.14\brigadier-1.0.14.jar" "-e=jars\libraries\org/lwjgl\lwjgl-opengl\3.1.6\lwjgl-opengl-3.1.6-natives-windows.jar" "-e=jars\libraries\org/lwjgl\lwjgl\3.1.6\lwjgl-3.1.6.jar" "-e=jars\libraries\commons-io\commons-io\2.5\commons-io-2.5.jar" "-e=jars\libraries\com/mojang\realms\1.13.9\realms-1.13.9.jar" "-e=jars\libraries\com/mojang\authlib\1.5.25\authlib-1.5.25.jar" "-e=jars\libraries\com/google/code/gson\gson\2.8.0\gson-2.8.0.jar" "-e=jars\libraries\org/lwjgl\lwjgl-glfw\3.1.6\lwjgl-glfw-3.1.6-natives-windows.jar" "-e=jars\libraries\com/paulscode\codecwav\20101023\codecwav-20101023.jar" "-e=jars\libraries\org/lwjgl\lwjgl-stb\3.1.6\lwjgl-stb-3.1.6-natives-windows.jar" "-e=jars\libraries\org/lwjgl\lwjgl-openal\3.1.6\lwjgl-openal-3.1.6.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-core\2.8.1\log4j-core-2.8.1.jar" "-e=jars\libraries\org/lwjgl\lwjgl-openal\3.1.6\lwjgl-openal-3.1.6-natives-windows.jar" "-e=jars\libraries\io/netty\netty-all\4.1.25.Final\netty-all-4.1.25.Final.jar" temp/minecraft_ff_in.jar temp\src\minecraft' failed : 1 19:36:19 - Decompile failed

@Sakuya-Izayoi

This comment has been minimized.

Copy link

Sakuya-Izayoi commented May 27, 2019

where i can get 1.13.2 srgs?

@WotblitzMC

This comment has been minimized.

Copy link

WotblitzMC commented Jun 26, 2019

Two problems with this tutorial:

  1. He didn't specify what natives are, natives are files with example in windows: .dll files but are different depending on os. But you should not need to copy/configure files at all except the 1.12.jar, as by default all files are download using the version.json or 1.xx.x.json file in the mc dir (Some problems can happen which makes that you have to reconfigure some files)

  2. With the new launcher, the version.json or 1.xx.x.json is differently structured than before therefore can MCP not read it. I do not know python as that is the language it is written on, so I can not fix it.

@jLynx

This comment has been minimized.

Copy link

jLynx commented Jun 28, 2019

@0xx06 have you made anymore progress? I managed to get to the same stage as you

@Delta2Force

This comment has been minimized.

Copy link

Delta2Force commented Aug 6, 2019

If you are trying to decompile 1.14 with this, you will have to uncomment a line in the commands.py file or else the decompiler will error out. This is because the line is referencing to a lwjgl API which doesn't exist anymore since Minecraft now uses lwjgl 3 instead of lwjgl 2.
Edit: still doesn't work

@jeengbe

This comment has been minimized.

Copy link

jeengbe commented Aug 20, 2019

If you are trying to decompile 1.14 with this, you will have to uncomment a line in the commands.py file or else the decompiler will error out. This is because the line is referencing to a lwjgl API which doesn't exist anymore since Minecraft now uses lwjgl 3 instead of lwjgl 2.

Which line

@Delta2Force

This comment has been minimized.

Copy link

Delta2Force commented Aug 21, 2019

If you are trying to decompile 1.14 with this, you will have to uncomment a line in the commands.py file or else the decompiler will error out. This is because the line is referencing to a lwjgl API which doesn't exist anymore since Minecraft now uses lwjgl 3 instead of lwjgl 2.

Which line

Nevermind it still didn't work

@WotblitzMC

This comment has been minimized.

Copy link

WotblitzMC commented Aug 29, 2019

The reason mc versions newer then 1.12 doesn't work(I believe), is that mcp is read the version.json file(eg 1.12.2.json or 1.14.4.json). But after 1.12.2 the structure of the json file changed, but no new mcp version where released to support it.

@reZach

This comment has been minimized.

Copy link

reZach commented Sep 1, 2019

Is there any progress on the new version of MCP?

@WotblitzMC

This comment has been minimized.

Copy link

WotblitzMC commented Sep 20, 2019

I found something interesting at this repo

@WotblitzMC

This comment has been minimized.

Copy link

WotblitzMC commented Sep 20, 2019

Haven't got time to test it yet.

@S-B99

This comment has been minimized.

Copy link

S-B99 commented Oct 18, 2019

How do I tell mcp to use this?
The original url went down so I want to use this url now, or host it on my own git repo. I can't find anythere referencing how to change it or a url itself. You can look at my entire project here, thanks

@davidtoledo

This comment has been minimized.

Copy link

davidtoledo commented Oct 27, 2019

Works like a charm! tks!

@christiaan20

This comment has been minimized.

Copy link

christiaan20 commented Jan 25, 2020

I have the interesting problem that following these steps I am successfully able to launch a minecraft 1.12.2 using startclient.bat, but he doesn't recompile the src/minecraft/net code instead he launches the vanilla version of MC 1.12.2. I have tried doing some debugging going as far as comparing the variables in the python code used to launch the client with a working MCP9.40 for MC 1.12 but I found nothing suspicious until now and I would prefer not going deeper into this rabbit hole. I don't belief the 1.12.2-natives library is the problem because I do my code editing in intellij and I test running the startclient.bat in command window.

@WotblitzMC

This comment has been minimized.

Copy link

WotblitzMC commented Jan 25, 2020

Chris, I have done a 1.12.2 project with mcp 1.12 and you'll have to update every reference from 1.12 to 1.12.2 and replace the mappings. Lastly you have to run updatemd5.bat. That's it, you must've configured mcp wrong. Note! I used eclipse not intellij.

@christiaan20

This comment has been minimized.

Copy link

christiaan20 commented Jan 27, 2020

This is a reply to both of these comments

Chris, I have done a 1.12.2 project with mcp 1.12 and you'll have to update every reference from 1.12 to 1.12.2 and replace the mappings. Lastly you have to run updatemd5.bat. That's it, you must've configured mcp wrong. Note! I used eclipse not intellij.

I have the interesting problem that following these steps I am successfully able to launch a minecraft 1.12.2 using startclient.bat, but he doesn't recompile the src/minecraft/net code instead he launches the vanilla version of MC 1.12.2. I have tried doing some debugging going as far as comparing the variables in the python code used to launch the client with a working MCP9.40 for MC 1.12 but I found nothing suspicious until now and I would prefer not going deeper into this rabbit hole. I don't belief the 1.12.2-natives library is the problem because I do my code editing in intellij and I test running the startclient.bat in command window.

Thank you for the suggestion WotblitzMC.

But the solution was very simple you need to run recompile.bat before Startclient.bat.

Seems logical but it seemed to me that startclient.bat was doing the recompile automatically when you used the original MCP 9.40 in MC 12.2 without changing any of the mappings or config files. Once you change any of that, you need to manually recompile the source code before running StartClient.bat.

Ofcourse I only tested this when running the .bat files from windows cmd, so only assume it applies to this setup.

@SpaceBrave

This comment has been minimized.

Copy link

SpaceBrave commented Jan 30, 2020

I did everything right except I'm new to Eclipse and don't know how to import libraries. The only errors I get are:

Project 'Client' is missing required library: 'jars/libraries/com/mojang/realms/1.10.17/realms-1.10.17.jar'
The project cannot be built until build path errors are resolved

Whare do I change the build paths and where do I attach the libs?

@RizeXor

This comment has been minimized.

Copy link

RizeXor commented Jan 30, 2020

Can someone send me for 1.14 or 1.15? Thanks

@SpaceBrave

This comment has been minimized.

Copy link

SpaceBrave commented Jan 30, 2020

Can someone send me for 1.14 or 1.15? Thanks

You cannot do it because srgs for these versions don't exist

@SpaceBrave

This comment has been minimized.

Copy link

SpaceBrave commented Jan 30, 2020

Could someone just explain the whole Eclipse part in actual detail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.