-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCP's decompile.sh script fails on mac due to narrator library natives #501
Comments
Thank you so much for this solution! |
Thank you so much, but another error showed up after I launched Eclipse.
Can you help me with this? |
That's got nothing to do with this. But you need to be using Java 8 (both as the compiler and as a library in build path). |
I installed Java SE 8 [1.8.0_144], but this error showed up, thank you sooo much for helping me!!!
|
Those are all warnings. If your IDE is configured to treat those as errors, change it to a warning (or disable it entirely). It is unfixable by nature of the same issues being present in the actual game code - decompilation won't get rid of it. |
python sucks with indentation errors. this won't actually work unlesslibFilename is lined up with continue. also watch out for spaces/tabs.
EDIT: MD's formatting also sucks. but you get the idea. |
I used all spaces; my indentation is correct. You do still need to make sure that you use all spaces, as that's how the rest of the file is formatted (and mixing spaces and tabs is not allowed in python). |
here is a simple error I got that I have never gotten before while doing this:
any ideas? I already reset the game. |
Thank you so much, you solved my problem! I am completely new to coding and I encountererd this problem and had NO IDEA how to fix it, so when the problem came, I just said to myself: Well, time to leave coding and try something else... |
Thank you so much,you solved the problem! |
@MajickTek Did you ever solve that issue? I'm having the same problem. |
nope - still unsolved |
Gah! Literally all I want to do is study MC's damn code because I'm learning Java at my uni, but I can't seem to get this thing decompiled. |
the code is complex, just saying ;) |
I figured it out I just chose to analyze mc 1.10 instead. The code is also fairly basic for what it is, just a fair amount of certain things that I haven't learned yet. |
If you really can’t figure it out, i have public downloads on my site: https://baddeveloper.xyz |
@stijnsimons : thanks a lot. Will download and check out later. |
@stijnsimons This actually works! thanks! I will analyze the files and try to build a tutorial on how to do this. |
is it against the rules to distribute modified versions of MCP, though? correct me if I'm wrong here. |
I think so. |
No since it doesn’t have a license + as long as you don’t change the name and resell it, its fine i guess. |
I guess that's true? I mean, EPIK had their own version built for netbeans a while back so i guess it's fine |
MCP does have a license (LICENSE.txt) and it's pretty explicit:
The license in turn references the Minecraft EULA, which you should have already read. |
What an useless license since they’re too lazy to patch this small bug. |
the files are still in your GitHub repo |
I don’t own the repo. |
nvm thought you were Strezzed lol |
Also, mavenMCP isn’t agains the license since it downloads mcp from the official site |
First off, blame someone for not telling me. I've fixed this for the next release. I don't have a Mac system so I don't typically fully test all of this. Tho with the launcher json not officially documented anywhere that I know of it was pretty much bests guessed when Prof wrote it. |
Now we wait for release. The only latest build is MCP940, which is 1.12. We need an official MCP941 and 942 (1.12.1, 1.12.2, respectively.) |
@LexManos That was a bit of a backhanded comment. I don't think anyone blamed you, and I wanted to see the game's code because I was curious about how the game was structured. Also, I was curious to see how it renders the game, I'm fairly new to programming Java as I'm only a freshman at my uni and I wanted to see a professional implementation of the language to try and obtain a deeper understanding of it. |
the problem is this is not a "professional implementation", this is reverse engineered and decompiled code which is full of hacks, from both Mojang and otherwise. The class/field/method names you see? They're not even the real names Mojang uses, they're guesses the community has made. And some of them are terribly wrong (just see other issues on this repo for examples) It's not a place to learn as you'll pick up bad habits. |
@Pichuminer there is multiple ways to do it, either the mac patches mentioned above, or use something like https://github.com/hypercubemc-github/Modern-Minecraft-Decompiler which uses ForgeGradle to extract the MCP code of modern minecraft versions into an eclipse/idea project. I'm on a Windows PC now no this issue isn't relevant to me anymore. Edit: the fixes above may not work anymore so go to https://github.com/ThisTestUser/MCPFixer and use that, it might work. It's essentially the same idea as Modern Minecraft Decompiler but you do the patching yourself without gradle. |
Bloody hell, another 2 projects that are taking the MCP name, and are using that..... |
@FinnT730 Those aren't 2 projects..... Modern Minecraft Decompiler is literally MCP, using the forge version. The MCPFixer repo is a script to patch the 1.12 version of MCP to work for 1.13 and up. |
MCP is dead, just let it rest in peace. |
This was reported by NarcolepticFrog elsewhere recently, though it was also mentioned in
#mcp
.Running
decompile.sh
on mac with MC 1.12 causes this:I personally do not use a mac, but I do know how version JSONs work. Here's the relevant data for the narrator library:
There are 4 libraries specified there:
com.mojang:text2speech:1.10.3
com.mojang:text2speech:1.10.3
again, but with"natives"
and"extract"
ca.weblite:java-objc-bridge:1.0.0
ca.weblite:java-objc-bridge:1.0.0
again, but with"natives"
and"extract"
What's going on here (and you can see this pretty well if you take a look at the sources for text2speech) is that text2speech uses a library to interact with ObjectiveC code to communicate with whatever text2speech system is included with mac, while on windows and linux it directly access native code without needing a separate library. But this means that
text2speech
only has natives for windows and linux, while the objectivec bridge has natives for OSX only. However, the text2speech natives does not have a rule defined to limit it to windows and linux (perhaps this is a mistake with the version JSON).This should be fixable by changing this (in
MinecraftDiscovery.py
):to this:
Or Mojang should be able to fix this by adding
to the narrator natives library (but not the narrator library itself). MCP itself would handle this correctly, and I think that this would be the logically correct version JSON. (I haven't created an MCL issue for this, but I may later if it seems like a good idea)
The text was updated successfully, but these errors were encountered: