Большая ошибка при запуске сценария декомпиляции из MCP940 для Minecraft 1.12 - PullRequest
0 голосов
/ 21 сентября 2019

Я пытаюсь использовать MCP940 для декомпиляции исходного кода Minecraft.Я запустил файл decompile.sh (я на Mac) через Терминал и получил огромную ошибку.

Инструкции в файле readme не дают никаких подробностей, касающихся процесса декомпиляции, толькоследующее:

1) Prepare the files:
- Copy the "minecraft_server.1.12.jar" file into the "jars" folder.
- Either copy the folders "assets", "libraries" and "versions" from "%APPDATA$\.minecraft" folder into the "jars" folder or let the decompile scripts do it automatically for you.
- No need to copy the folders "bin" and "resources" from your "%APPDATA$\.minecraft" folder into the "jars" folder anymore - in fact, it does not work that way anymore.

2) Decompilation and patching
- Start the "decompile.bat" script in this folder.

3) Modding
- Modify the sourcecode in the "src\minecraft" folder or in the "src\minecraft_server" folder.

Я скопировал файл minecraft_server.1.12.jar поверх.

Вот сообщение об ошибке:

== MCP 9.40 (data: 9.40, client: 1.12, server: 1.12) == "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
== 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 'patch -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/PlayerAdvancements.java.rej
==================

'patch -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.java.rej
==================

'patch -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.java.rej
==================

'patch -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.java.rej
==================

'patch -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.rej
==================

'patch -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.java.rej
==================

'patch -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/BlockStateMatcher.java.rej
==================

> Cleaning comments
- Done in 337.73 seconds
== Reformating client ==
> Cleaning sources
> Replacing OpenGL constants
> Reformating sources
- Done in 20.60 seconds
== Updating client ==
> Adding javadoc
> Renaming sources
- Done in 14.53 seconds !! Modified jar detected. Unpredictable results !!
== Decompiling server using fernflower ==
> Creating SRGs
> Applying SpecialSource '"java" -cp "runtime/bin/specialsource.jar:lib:lib/*:jars/minecraft_server.1.12.jar"
-jar runtime/bin/specialsource.jar -i jars/minecraft_server.1.12.jar -o temp/minecraft_server_rg.jar -m temp/server_rg.srg --kill-source' failed : 1

== ERRORS FOUND ==

Loading mappings 7 packages, 3343 classes, 11909 fields, 20807 methods
Remapping final jar Exception in thread "main"
java.lang.ArrayIndexOutOfBoundsException: Index 223 out of bounds for
length 222    at
org.objectweb.asm.ClassReader.<init>(ClassReader.java:181)    at
org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)    at
org.objectweb.asm.ClassReader.<init>(ClassReader.java:424)    at
net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:228)
  at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:189)
  at net.md_5.specialsource.SpecialSource.main(SpecialSource.java:270)
==================

Decompile failed ```
...