#Is it possible to access a running Minecraft Client's source code or something?
42 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @primal river! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
in what context?
do u just want to access the source code of minecraft or are u modding or something similar?
I want to make a ghost client
your question doesnt make much sense, but: You can "inject" into a running java instance (what minecraft runs on) and potentially modify classes, replace classes, etc. This includes downloading all classes currently loaded into the jvm, and decompiling them to view their "source" code (not exactly source, but the best java source representation of the compiled classes). See https://www.javaadvent.com/2019/12/a-beginners-guide-to-java-agents.html
While Java beginners quickly learn typing public static void main to run their applications, even seasoned developers often do not know about the JVM’s support of two additional entry points to a Java process: the premain and the agentmain methods. Both methods allow so-called Java agents to contribute to an existing Java program while residing ...
With only one attribution
i dont think we help with cheats
so u just want to see minecraft source code?
if thats all u want to do u could set up a project with fabric and gradle/maven and just browse the minecraft-common and minecraft-clientonly sources
I want to understand how reach and some of the other things work
alternatively u could use mcp
@soft violet do you know about agents
to be honest I personally don't care if people cheat in games as long as they don't break any ToS
My question is
Such as if we have a calculator program as a jar file and we want to change the "7" number to number "9" without editing its source code
How can we do that
And what i want to do is changing reach value of a client
well to do that then you will need a client you can well, "hack"
or in this case, control
it will probably need to connect to a server
like localhost:3000
it needs to send the values and retrieve them every frame most likely
NODE.JS has this sorta functionallity, with express and ejs
it can create localhost:3000 ports and has the .html capability. Just connect that with same java to read it (probably using a buffered reader or something different) and make it changeable through node js because the EJS can have values, just assign probably JSON which works with js because it is in the name. Just try to edi the values through the server and the client should see the changes
that is the only functiontallity
otherwise, you can just use a readable .txt file with a value like a number in this case 9, it will read it and put it somewhere (your choice). and make it update constantly whilst making it not lag your computer, it will read the files from a certain directory and since it is not part of the jar, it will read it like anyother file.
I have experienced this exact behaviour whilst running a python file that is not in a jar file
Basically, it is very confusing by also very possible
if you want, I can create a github repos for this exact behaviour.
my github account is at https://github.com/KyfStore
also I saw before you wanted to know, JMCCC is also a good replacement for minecraft source code. It took me 3 days to figure it out by I can tell you the instructions and the link to the github. Download the zip file btw. Link: https://github.com/xfl03/JMCCC
it works exactly like minecraft and the sourcecode in completely free just in the zip directory after extracting use these cmds:
gradlew build
gradlew shadowJar
java -jar jmccc-cli/build/libs/jmccc-cli-3.1.4.jar
NOTE: You may have to switch 3.1.4 with a different version depending on the time xfl03 changes it
Also these are the steps for windows, not mac/linux
btw
not the mcp 💀
there is no replacment for mcp, which is sad and id like to work on one (ive got knowledge on how to make gradle plugins), but id need someone to work with