MCP 1.12 IntelliJ/Gradle Tutorial - Deobfuscation, Project Creation, and Building/Exporting!
HTML-код
- Опубликовано: 28 сен 2024
- In this tutorial I show you how to run the MCP tools to get the source code of Minecraft, it's libraries, and it's assets, then use those to create an IntelliJ/Gradle project that will allow you to edit the source code and run the client. Then, I show you how to compile and build your code into a functioning minecraft "release" version.
VM Arguments: -Djava.library.path=../libraries/1.12-natives
MCP: modcoderpack.com
Dude, after hours of searching online, this guide was the only one that was actually helpful. All the other guides were missing some minor details but this one got it all. Thank you so much
Agreed!
I think you accidentally forgot to make more videos
I have been searching for a tutorial like this for 1 year and I finally found the best one that will help me a lot.
Same here
I have been searching for a tutorial like this for a really long time, Thank You!
tysm, its easy and I love intellij, but could only find eclipse tutorials.
:)
Excellent tutorial. Straight to the point.
Followed the tutorial to the letter and still having issues with the "Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl64 in java.library.path"
Edit: Figure it out. Its not "-Djava.library.path=../libraries/1.12-natives" its "-Djava.library.path=../libraries/1.12/1.12-natives", there is a "/1.12/" missing in there
that's kuz u added a folder called "1.12" lol nobody else did
No way! Xcom using an MCP setup tutorial for IntelliJ. Nice to see you here
This guy doesn't deserve a medal. He deserves a statue.
When I run it in intelliJ everything works and I can play but after building the .jar file, making the .json file and everything I drag it into the versions folder and it shows up in my launcher and it doesn't show me that i have to download anything, it looks like it works but when I try to play it I get a popup error: "Error: A JNI error has occured, please check your installation and try again later" and after closing that popup I get enother one: "A Java Exception has occured.". Please help!
Helpful tutorial, Thanks!
it said i need java jdk but i cart find a valid file for it when i go to java and download the file it wont download the full file
Can i use VSCode instead of Intellij IDEA 2019?
I get this error when I start the client: intellij\src\main\java
et\minecraft\util\ResourceLocation.java:3: error: package org.apache.commons.lang3 does not exist
import org.apache.commons.lang3.Validate;
Sounds like an issue with your dependencies. I would suggest that you retry from the start
but now i have the problem, that when i exported the client minecraft dont lets me play it, when I remove the download section in the json file im using optifine src and it works in workspace
I get this error: [17:37:30] [Client thread/INFO]: Setting user: me
[17:37:30] [Client thread/INFO]: (Session ID is token:I cleaned it)
[17:37:31] [Client thread/INFO]: [OptiFine] *** Reflector Forge ***
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.client.model.Attributes
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: mods.betterfoliage.client.BetterFoliageClient
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.fml.common.asm.transformers.BlamingTransformer
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.event.world.ChunkWatchEvent$UnWatch
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.fml.relauncher.CoreModManager
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.common.DimensionManager
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.client.event.GuiScreenEvent$DrawScreenEvent$Pre
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.client.event.GuiScreenEvent$DrawScreenEvent$Post
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.client.event.EntityViewRenderEvent$CameraSetup
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.client.event.EntityViewRenderEvent$FogColors
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.fml.common.eventhandler.Event
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.fml.common.eventhandler.EventBus
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.fml.common.eventhandler.Event$Result
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.common.property.ExtendedBlockState
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.fml.client.FMLClientHandler
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.fml.common.FMLCommonHandler
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: ady.getWaterColorMultiplier
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.addDestroyEffects
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.addHitEffects
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.canCreatureSpawn
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.canRenderInLayer
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.doesSideBlockRendering
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.getBedDirection
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.getExtendedState
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.getLightOpacity
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.getLightValue
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.hasTileEntity
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.isAir
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.isBed
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.isBedFoot
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: afh.isSideSolid
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: pk.canRiderInteract
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Field not present: pk.captureDrops
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Field not present: pk.capturedDrops
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: pk.shouldRenderInPass
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Method not present: pk.shouldRiderSit
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.event.ForgeEventFactory
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.common.ForgeHooks
[17:37:31] [Client thread/INFO]: [OptiFine] (Reflector) Class not present: net.minecraftforge.client.ForgeHooksClient
[17:37:31] [Client Shutdown Thread/INFO]: Stopping server
amazing man !!! thx
I can recompile it, I get this error; 'Initial client recompile failed, correct source then run updatemd5'. I've tried re-downloading it and everything, can anyone help?
you dont need to recompile just export the client
I love you you saved me hours of struggle
Hey i have problem: when i put the command in build.gradle everything looks good but then one file is upset its from "src>main>java>net.minecraft>advancements and the upset file is PlayerAdvancements." can anyone help? Please and Thank You.
have you tried clicking on other files to see if they are also upset? i found that intellij will only let you know when a file is upset when it is opened (which makes sense). if it's not just PlayerAdvancements, you probably don't have your dependencies set up right. if it is just that one file, idk how to help, other than look at the specific errors.
MCP decompile is saying the permission is denied
error: cannot find symbol
import javax.annotation.Nonnull;
^
symbol: class Nonnull
location: package javax.annotation
Fix?
So when you rebuild you just have to change the .jar and not the json ?
When I press run the project displays this error: cannot find symbol
import javax.annotation.Nonnull;
^
symbol: class Nonnull
location: package javax.annotation. Does anyone know how to fix this?
"scalac" is not found on the PATH. Scala files will not be recompiled
# found ff patches, srgs, name csvs, doc csvs, param csvs, astyle, astyle config, rg, ss
!! need either jad or fernflower available with patches !!
help if i decompile i don't get the mcp folder how do i fix this?
If you are using the latest IntelliJ, Instead of using the *"Program Arguments"* box, Click on *modify options* and check add vm options, then you can type your -Djava.library.path="..\libraries\1.12-natives" in there
1.15.2?
100 errors. java: package org.apache.commons.lang3 does not exist
BTW if you're making 1.12.2 leave assetindex on 1.12!
how to do it on a mac
)sont tell me not to use mac, my windows pc broke)
I have the error "Initial client recompile failed, correct source then run updatemd5". What do I do? Please help me! :/
Did you use Java SE Development Kit 8.0?
Gradle gives me this error: Cause: module java.base does not open java.lang to unnamed module @645aa696
can i use eclipse?
i get "Target option 6 is no longer supported. Use 7 or later." and "Source option 6 is no longer supported. Use 7 or later."
i have 1.7.10 installed and launched with it's the appropriate mcp file mcp908
i have JDK 14.0.1 64-bit and Java 8 Update 251
edit: i forgot to upgrade to 64bit jdk
Did you fix it?
@@kakuchinnonagemuda8665 Yes, I had the correct JDK but forgot to assign it as the Java target after letting MCP do it's work, it will still give an error even after that but usually a restart/clean+build would clear the errors out
Help when I run the decompile.bat it says I need to download jdk you’re awesome
Go to the oracle website and download a jdk, if you're new to Java then I'd say use jdk8 since you probably already have the Java Runtime Environment 8 (jre8)
But I already have java that’s the problem
just install it again (from the site)
Ok I’ll do that
i get this,
Execution failed for task ':Start.main()'.
> Process 'command 'C:/Program Files/Java/jdk1.8.0_261/bin/java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
me too
same here
Intellij>File>Invalidate Caches>Invalidate Caches and restart
It's still obfuscated though, you never deofuscated it..
Most of it is not obfuscated. Some of it still is as MCP doesn't have the appropriate mappings for them. Usually they're unimportant stuff though. It's literally variable rename, not hard to deobfuscate.
Yes, dobfuscation is done by the MCP team (and generally the community who add more changes) but the entire jar isn't and probably never will be fully deobfuscated, at least not in this version and lower. It takes too much work, but generally the important stuff has been deobfuscated enough that you can understand what is going on. Sorry!
I can't use optifine source because it just says missing class files missing packages and whatnot. Does anyone know how to fix this
mee too
BUT...
easy fix i found on luck:
1 put optifine src in the java folder (like you probably did)
2 move the assets folder to the resource folder (the other folder with the java folder)
3 replace all files
4 yeah just that ;-;
(sorry if my engrish is bad, im from brazil)
@@Babakinha Fixed it way before I posted this, I just had to search the internet for the 'Vecmath' jar file, and add it to the libraries
If your on linux/mac dont use the ".bat" files but instead the ".sh" files
.bat files are for windows and he uses that OS that's why (Python is actually the backend of MCP)
Unrecognized option: -Xincgc
sorry if this is late but i think you need to remove the argument line -xincgc
go to run -> click on the arrow -> run configuration -> arguments and remove -xincgc
can you use this to make a mod instead?
Where you able to do it I couldn’t when I open the decompile.bat and it says I need to download jdk
@@starsited529 ok?
Ty!
You're welcome!
Great video.
Hmmmm gunna make some nice hax cuz my friend killed my dog
idk how but I put in -Djava.library.path=../libraries/1.12-natives/ but it still does the error.... idk whats wrong
This is a very helpful tutorial, thank you for making this and I hope you decide to make more of these :D
yo
Copying assets... OK
Parsing JSON file... OK
Looking for minecraft main jar... OK
> Checking libraries...
Copying library log4j-api... Error copying library log4j-api
Press any key to continue...
So much blood and sweat for nothing... thank you so much!
AAAAUUUUUUUUUUUGGGH
Im getting an error when I start minecraft. The error is in the class "PlayerAdvancements.java" at line 139. "error: incompatible types: java.lang.Object cannot be converted to java.util.Map.Entry
for (Entry entry : (List)stream.collect(Collectors.toList()))".
Someone please help me : (
Thank you so much, this was really helpful!
ya
o hi cookie
FarmerJoe lol
imps on top
I could not get sound event thought i followed exactly what you did, it says
[15:31:58] [Client thread/INFO]: Setting user: Player441
[15:31:59] [Client thread/INFO]: LWJGL Version: 2.9.4
[15:32:01] [Client thread/INFO]: Reloading ResourceManager: Default
[15:32:02] [Sound Library Loader/INFO]: Starting up SoundSystem...
[15:32:03] [Thread-3/INFO]: Initializing LWJGL OpenAL
[15:32:03] [Thread-3/INFO]: (The LWJGL binding of OpenAL. For more information, see www.lwjgl.org)
[15:32:03] [Thread-3/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[15:32:03] [Thread-3/ERROR]: Unable to initialize OpenAL. Probable cause: OpenAL not supported.
[15:32:03] [Thread-3/WARN]: ERROR MESSAGE:
[15:32:03] [Thread-3/INFO]: Could not locate OpenAL library.
[15:32:03] [Thread-3/WARN]: STACK TRACE:
[15:32:03] [Thread-3/INFO]: org.lwjgl.openal.AL.create(AL.java:156)
[15:32:03] [Thread-3/INFO]: org.lwjgl.openal.AL.create(AL.java:102)
[15:32:03] [Thread-3/INFO]: org.lwjgl.openal.AL.create(AL.java:206)
[15:32:03] [Thread-3/INFO]: paulscode.sound.libraries.LibraryLWJGLOpenAL.init(LibraryLWJGLOpenAL.java:164)
[15:32:03] [Thread-3/INFO]: paulscode.sound.SoundSystem.CommandNewLibrary(SoundSystem.java:1576)
[15:32:03] [Thread-3/INFO]: paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2572)
[15:32:03] [Thread-3/INFO]: paulscode.sound.CommandThread.run(CommandThread.java:121)
[15:32:03] [Sound Library Loader/WARN]: ERROR MESSAGE:
[15:32:03] [Sound Library Loader/INFO]: Could not locate OpenAL library.
[15:32:03] [Sound Library Loader/INFO]: Starting up SoundSystem...
[15:32:03] [Thread-5/INFO]: Switching to No Sound
[15:32:03] [Thread-5/INFO]: (Silent Mode)
[15:32:04] [Sound Library Loader/INFO]: Sound engine started
[15:32:07] [Client thread/INFO]: Created: 1024x512 textures-atlas
[15:32:09] [Client thread/INFO]: Narrator library for x64 successfully loaded
[15:32:11] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[15:32:22] [Client thread/INFO]: Stopping!
[15:32:22] [Client thread/INFO]: SoundSystem shutting down...
[15:32:22] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 1m 23s
3 actionable tasks: 3 executed
3:32:23 PM: Task execution finished 'Start.main()'.
I get this error: error: incompatible types: Object cannot be converted to Entry
for (Entry entry : (List)stream.collect(Collectors.toList()))
anyone know how to fix this please?
It might have to do with what version of Java you are using. Make sure you are using Java version 1.8!
I have a Java version 1.8.0_231 and it is not working :/
I also have this issue, java 1.8.0, did you find a fix? It's throwing this error at a bunch of different classes for different type conversions. X cannot be converted to Y
@@Dainternetdude i switched to the mcp reborn Version. It's a newer Version of the mcp and there is a Installation Guide in the github repo.
@@lol_gamer2333 mcp reborn looks like it's only for 13+ unfortunately
!! java check FAILED !!
[Error 2] The system cannot find the file specified
my whole net.minecraft is full of errors what do i do??
error: incompatible types: Object cannot be converted to Entry
for (Entry entry : (List)stream.collect(Collectors.toList()))
pls help ;-;
does it work with eclipse??
yes
@@genericframes i meant gradle mcp
== MCP 9.40 (data: 9.40, client: 1.12, server: 1.12) ==
Json file not found in C:\Users\DEL\AppData\Roaming\.minecraft\versions\1.12\1.12.json
Please run launcher & Minecraft at least once.
any way to FIX this
It is literally telling you what to do in the third line of text, it wants you to run the launcher & minecraft 1.12.2 since it couldnt find the version in your versions folder.
my client keeps crashing when i run it
Can you make a vid on how to use more modern versions of MC?
I tried it in 1.8 and can confirm that it works there too
Pls more vids about this :)
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
I miss the mcp folder...
blicky stiffy
Yo any reason it could be launching very slow? I had same issue in eclipse so I moved to intelij since I like it better anyways, takes up to 30m to launch when I press start.
help, the minecraft launcher keep replacing my file because of wrong file size but I already follow all the step
Any idea of how to fix: Process 'command 'C:/Users/andre/.jdks/adopt-openj9-1.8.0_252/jre/bin/java.exe'' finished with non-zero exit value 1
I have the same error
Hey, i get such husk errors, and Java code erros, how can i fix them?
is this the same in 2020? if im using the same mc version (1.12.2 not the mcp version)
It says "Execution failed for task ':Start.main()'.
i got an Error copying library patchy can someone help me?
Hey! What if i did a 1.12.2 tutorial and didnt add a gradle thing 1:45 what could i do to fix that without restarting the whole project?
Hi i've got a problem. So i did a other tutorial but then when i'm loading the version i get a normal 1.12.2 version not my edited one. Do you know what might be the source of this problem? The json file: pastebin.com/hyEAxEBD
Copying library jinput... Error copying library jinput
help ME
Get to your .minecraft file. Copy (DO NOT MOVE) the library folder and paste it into MCP's jars folder.
@@jaajsous Thank you, but another error appeared 1 out of 1 hunk failed - saving rejects to file 'net \ minecraft \ advancements \ player advance #
@@3ai4onok78 I have that too. I'm currently working on it, I'll keep you up to date.
@@jaajsous hi, are you doing something?
@@3ai4onok78 Apparently the answer didn't send a week ago, so I'll send again : You need JDK-8 and not higher/lower.
I get a lot of errors
IT WORKS THANK YOU SO MUCH!
When decompiling , it says “Initial client recompile failed, correct source and run updatemd5”. Any ways to fix this?
Depends on the full error. That usually means there a problem with the java version your using or your config file. Send me your logs
Launcher/launcher (main) Info Exception in thread "main" java.lang.SecurityException: SHA-256 digest error for bib.class
Any fix?
META
you need to remove the META-INF folder from the jar before decompiling/deobfuscating.
Please add a costum menu??
is this official minecraft launcher?
uhm
@@memexurer elo xD
Заткнись.
Это грубо
are you going to make tutorials??
Maybe. I lack a quiet recording area, once I have a better situation I'll definitely look into making modding and plugin tutorials. Thanks for asking!
ChrisUMB can you help it says I need to download jdk what ever that is
@@starsited529 search it up jdk is a java developer kit it allows you to develop java programs oracle can be a little tricky but I like openjdk.java.net/ more just google "how to install openjdk" or search it up on youtube
I tried your tutorial with a simple modification and it worked. After, I added my code in the folder (src/main/java) and this error appear.
I have this error when im trying to log on a server.
Internal Exception: io.netty.handler.codec.DecoderException: java.IOException: Bad packet id 64.
Can you help me ?
go in singleplayer not multi
@@prouddesk6577 I fixed it, in single player the game just crash.
didnt work