gpt4 book ai didi

minecraft - 尝试使用 MCP 反编译 Minecraft 1.12 时出现巨大错误

转载 作者:行者123 更新时间:2023-12-05 02:14:10 27 4
gpt4 key购买 nike

我一直在尝试使用 MCP 将 Minecraft 源代码反编译到 eclipse 工作区。我正在使用 mcp940 反编译 Minecraft 1.12。当我运行 BATCH 文件 decompile.bat 时,它给我一大堆错误。我正在关注这个问题底部链接的视频教程,主持人完全跳过了这一步。 eclipse 工作区仍然加载并包含所有代码,但所述代码充满错误。当我尝试运行具有 main 方法的类 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 . . .

注意:我不得不删除一堆折旧警告以适应这一点。

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

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

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

最佳答案

我解决了这个问题,我会把它放在这里以供分享我的问题的任何人使用。我使用的是 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

关于minecraft - 尝试使用 MCP 反编译 Minecraft 1.12 时出现巨大错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53973050/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com