尝试使用MCP反编译Minecraft 1.12的巨大错误

时间:2018-12-29 20:18:16

标签: minecraft

我一直在尝试使用MCP将Minecraft源代码反编译为Eclipse工作区。我正在使用mcp940反编译Minecraft 1.12。当我运行BATCH文件decompile.bat时,它给了我很多错误。我正在跟踪此问题底部的视频教程,主持人完全跳过了这一步。 eclipse工作区仍在加载并具有所有代码,但是所说的代码充满错误。当我尝试运行带有主方法的类Start时,出现以下错误消息:

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

该视频教程链接到另一个视频教程(也在下面链接),有关修复领域jar版本。我已解决此问题,但似乎该问题只是其中的一个。 修复此部分后,我尝试运行它,但仍然收到相同的错误消息。

这是控制台的输出:

== MCP 9.40 (data: 9.40, client: 1.12, server: 1.12) ==
> Searching for javac.exe in C:\Program Files
"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
Looking in C:\Users\Calvin\AppData\Roaming\.minecraft\versions for mc installs... OK
Copying assets... OK
Parsing JSON file... OK
Looking for minecraft main jar... Not found
Copying minecraft main jar... OK
> Checking libraries...
        Copying library jinput... OK
        Copying library icu4j-core-mojang... OK
        Copying library httpcore... OK
        Copying library log4j-api... OK
        Copying library commons-lang3... OK
        Copying library jna... OK
        Copying library lwjgl-platform-natives-windows... OK
        Copying library libraryjavasound... OK
        Copying library jopt-simple... OK
        Copying library text2speech... OK
        Copying library guava... OK
        Copying library oshi-core... OK
        Copying library httpclient... OK
        Copying library commons-compress... OK
        Copying library text2speech-natives-windows... OK
        Copying library fastutil... OK
        Copying library platform... OK
        Copying library codecjorbis... OK
        Copying library soundsystem... OK
        Copying library librarylwjglopenal... OK
        Copying library lwjgl_util... OK
        Copying library commons-codec... OK
        Copying library jutils... OK
        Copying library patchy... OK
        Copying library commons-logging... OK
        Copying library lwjgl... OK
        Copying library commons-io... OK
        Copying library realms... OK
        Copying library authlib... OK
        Copying library gson... OK
        Copying library jinput-platform-natives-windows... OK
        Copying library codecwav... OK
        Copying library log4j-core... OK
        Copying library netty-all... OK
> Checking Natives...
        Extracting native lwjgl.dll... OK
        Extracting native OpenAL32.dll... OK
        Extracting native jinput-dx8_64.dll... OK
        Extracting native SAPIWrapper_x86.dll... OK
        Extracting native jinput-wintab.dll... OK
        Extracting native jinput-dx8.dll... OK
        Extracting native jinput-raw.dll... OK
        Extracting native OpenAL64.dll... OK
        Extracting native SAPIWrapper_x64.dll... OK
        Extracting native jinput-raw_64.dll... OK
        Extracting native lwjgl64.dll... OK
> Copying jsr305-3.0.1.jar to Libraries
> Copying jsr305-3.0.1-sources.jar to Libraries
== Decompiling client using fernflower ==
> Creating SRGs
> Applying SpecialSource
> Applying MCInjector
> Creating renamed srg
> Filtering classes
> Decompiling
> Unpacking jar
> Copying sources
> Generating package-info files
> Applying fernflower fixes
> Applying patches
'runtime\bin\applydiff.exe -p1 -u -i ..\..\temp\temp.patch -d src\minecraft' failed : 1

== ERRORS FOUND ==

1 out of 1 hunk FAILED -- saving rejects to file 'net\minecraft\advancements\PlayerAdvance#'
==================

'runtime\bin\applydiff.exe -p1 -u -i ..\..\temp\temp.patch -d src\minecraft' failed : 1

== ERRORS FOUND ==

1 out of 2 hunks FAILED -- saving rejects to file 'net\minecraft\client\renderer\entity\RenderManager#'
==================

'runtime\bin\applydiff.exe -p1 -u -i ..\..\temp\temp.patch -d src\minecraft' failed : 1

== ERRORS FOUND ==

1 out of 2 hunks FAILED -- saving rejects to file 'net\minecraft\util\math\Cartesian.jav#'
==================

'runtime\bin\applydiff.exe -p1 -u -i ..\..\temp\temp.patch -d src\minecraft' failed : 1

== ERRORS FOUND ==

1 out of 1 hunk FAILED -- saving rejects to file 'net\minecraft\client\util\SearchTree.ja#'
==================

'runtime\bin\applydiff.exe -p1 -u -i ..\..\temp\temp.patch -d src\minecraft' failed : 1

== ERRORS FOUND ==

1 out of 1 hunk FAILED -- saving rejects to file 'net\minecraft\client\renderer\block\statemap\StateMap.java#'
==================

'runtime\bin\applydiff.exe -p1 -u -i ..\..\temp\temp.patch -d src\minecraft' failed : 1

== ERRORS FOUND ==

1 out of 1 hunk FAILED -- saving rejects to file 'net\minecraft\client\gui\GuiSnooper.ja#'
==================

'runtime\bin\applydiff.exe -p1 -u -i ..\..\temp\temp.patch -d src\minecraft' failed : 1

== ERRORS FOUND ==

2 out of 2 hunks ignored -- saving rejects to file 'net\minecraft\block\state\pattern\BlockStateMat#'
==================

> Cleaning comments
- Done in 2605.28 seconds
== Reformating client ==
> Cleaning sources
> Replacing OpenGL constants
> Reformating sources
- Done in 118.96 seconds
== Updating client ==
> Adding javadoc
> Renaming sources
- Done in 126.23 seconds
!! Missing server jar file. Aborting !!
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk-10.0.2\bin\javac" -Xlint:-options -deprecation -g -source 1.8 -target 1.8 -classpath "jars\versions\1.12\1.12.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\org\lwjgl\lwjgl\lwjgl-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives-windows.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\com\mojang\text2speech\1.10.3\text2speech-1.10.3-natives-windows.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\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.17\realms-1.10.17.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\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;jars\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.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' failed : 1

== ERRORS FOUND in JAVA CODE ==


            this.block.addCollisionBoxToList(this, worldIn, pos, p_185908_3_, p_185908_4_, p_185908_5_, p_185908_6_);
                      ^

src\minecraft\net\minecraft\block\state\pattern\BlockStateMatcher.java:64: error: incompatible types: inference variable T#1 has incompatible bounds
        return predicate.apply(blockState.getValue(property));
                        ^

    equality constraints: T#2
    upper bounds: CAP#1,Comparable<T#1>
  where T#1,T#2 are type-variables:
    T#1 extends Comparable<T#1> declared in method <T#1>getValue(IProperty<T#1>)
    T#2 extends Comparable<T#2> declared in method <T#2>matches(IBlockState,IProperty<T#2>,Predicate<?>)
  where CAP#1 is a fresh type-variable:
    CAP#1 extends Object from capture of ?
src\minecraft\net\minecraft\client\renderer\entity\RenderManager.java:266: error: incompatible types: bad type in conditional expression
            return renderplayer != null ? renderplayer : this.playerRenderer;
                                          ^

    RenderPlayer cannot be converted to Render<T>
  where T is a type-variable:
    T extends Entity declared in method <T>getEntityRenderObject(Entity)
src\minecraft\net\minecraft\client\renderer\entity\RenderManager.java:266: error: incompatible types: bad type in conditional expression
            return renderplayer != null ? renderplayer : this.playerRenderer;
                                                             ^

    RenderPlayer cannot be converted to Render<T>
  where T is a type-variable:
    T extends Entity declared in method <T>getEntityRenderObject(Entity)
src\minecraft\net\minecraft\client\gui\GuiIngame.java:1304: error: incompatible types: Object cannot be converted to IChatListener
        for (IChatListener ichatlistener : (List)this.field_191743_I.get(p_191742_1_))
                                           ^

src\minecraft\net\minecraft\client\util\SearchTree.java:54: error: cannot find symbol
            this.field_194045_b.func_194057_a(p_194039_1_, p_194039_2_.toString().toLowerCase(Locale.ROOT));
                                              ^

  symbol:   variable p_194039_1_
  location: class SearchTree<T>
  where T is a type-variable:
    T extends Object declared in class SearchTree
src\minecraft\net\minecraft\client\util\SearchTree.java:58: error: cannot find symbol
            this.field_194044_a.func_194057_a(p_194041_1_, p_194041_2_.toLowerCase(Locale.ROOT));
                                              ^

  symbol:   variable p_194041_1_
  location: class SearchTree<T>
  where T is a type-variable:
    T extends Object declared in class SearchTree
src\minecraft\net\minecraft\client\util\SearchTree.java:58: error: cannot find symbol
            this.field_194044_a.func_194057_a(p_194041_1_, p_194041_2_.toLowerCase(Locale.ROOT));
                                                                      ^

  symbol:   method toLowerCase(Locale)
  location: variable p_194041_2_ of type Object
src\minecraft\net\minecraft\client\gui\GuiSnooper.java:51: error: incompatible types: Object cannot be converted to Entry<String,String>
        for (Entry<String, String> entry : (new TreeMap(this.mc.getPlayerUsageSnooper().getCurrentStats())).entrySet())
                                                                                                                    ^

src\minecraft\net\minecraft\client\gui\GuiSnooper.java:59: error: incompatible types: Object cannot be converted to Entry<String,String>
            for (Entry<String, String> entry1 : (new TreeMap(this.mc.getIntegratedServer().getPlayerUsageSnooper().getCurrentStats())).entrySet())
                                                                                                                                               ^

src\minecraft\net\minecraft\client\gui\recipebook\GuiButtonRecipeTab.java:33: error: incompatible types: Object cannot be converted to RecipeList
        for (RecipeList recipelist : (List)RecipeBookClient.field_194086_e.get(this.field_193921_u))
                                     ^

src\minecraft\net\minecraft\client\renderer\block\model\ModelBakery.java:492: error: incompatible types: Object cannot be converted to ModelResourceLocation
            for (ModelResourceLocation modelresourcelocation1 : (Collection)entry.getValue())
                                                                ^

src\minecraft\net\minecraft\client\renderer\block\statemap\StateMap.java:57: error: incompatible types: Comparable cannot be converted to T
        return p_187490_1_.getName((Comparable)p_187490_2_.remove(this.name));
                                   ^

  where T is a type-variable:
    T extends Comparable<T> declared in method <T>removeName(IProperty<T>,Map<IProperty<?>,Comparable<?>>)
src\minecraft\net\minecraft\client\resources\FolderResourcePack.java:83: error: reference to listFiles is ambiguous
            for (File file2 : file1.listFiles(DirectoryFileFilter.DIRECTORY))
                                   ^

  both method listFiles(FilenameFilter) in File and method listFiles(FileFilter) in File match
src\minecraft\net\minecraft\util\math\Cartesian.java:57: error: incompatible types: inference variable T#1 has incompatible bounds
            return Arrays.asList(p_apply_1_);
                                ^

    equality constraints: T#2
    lower bounds: Object
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>asList(T#1...)
    T#2 extends Object declared in class GetList
15 errors
100 warnings
==================

Initial client recompile failed, correct source then run updatemd5

Press any key to continue . . .

注意:我不得不删除一堆折旧警告以适合此要求。

这应该只是在调试模式下实时运行Minecraft。

视频教程:https://www.youtube.com/watch?v=NoZ8AvQ

领域Jar修复教程:https://youtu.be/17FQl1xpOF0

1 个答案:

答案 0 :(得分:2)

我发现了问题,并将其放置在这里,供任何分享我的问题的人使用。我使用的是JDK 10,这导致了很多版本错误。我下载了JDK和JRE 8,调整了系统变量以解决该问题,删除了失败的MCP eclipse工作区,重新下载了MCP,这次再次与Java 8一起运行decompile.bat。

这是我使用的Java 8版本的下载链接: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html