Jump to content

Is This Worth It?


olrustyeye

Recommended Posts

I'm very interested in dissecting the minecraft code for myself. I really want to learn more Java coding, and I figured going through the code and pulling out the methods and commenting how it works would be a great way to do this. 

I was just wondering about if this would be useful to others/the modding community? The obvious answer is yes of course, but I also don't know if someone has already done this, or if going through he code is even worth my time? I was wondering what people thought?  Am I crazy and probably going to lose interest? Or is this something thats worth the effort?

Link to comment
Share on other sites

On 6/10/2017 at 2:20 PM, Alexiy said:

What is there to dissect? The source code is available. If you mean to edit the minecraft code directly, then you'll have to set up a custom environment - the code is located in gradle's cache directory as a Jar.

I think you misunderstand. By dissect I mean go through the code and pull out the methods and how they work. Obviously anyone can see the code. I don't mean editting anything. Much like you'd diagram a sentence I want to do the same to the minecraft code. 

Link to comment
Share on other sites

Usually, the method names chosen by the MCP team already describe the purpose of a method well enough, and if not, many methods have a JavaDoc added as well.

When a method is either unnamed or without a JavaDoc, you are welcome to name it and its parameters according to its purpose, adding a JavaDoc if necessary, and submit it either via the MCPBot_Reborn bot in #mcp on the Esper IRC, or by submitting an issue on the MCP github.

Edited by HashtagShell
grammur
Link to comment
Share on other sites

22 minutes ago, HashtagShell said:

Usually, the method names chosen by the MCP team already describe the purpose of a method well enough, and if not, many methods have a JavaDoc added as well.

When a method is either unnamed or without a JavaDoc, you are welcome to name it and its parameters according to its purpose, adding a JavaDoc if necessary, and submit it either via the MCPBot_Reborn bot in #mcp on the Esper IRC, or by submitting an issue on the MCP github.

Lol, I don't think you guys get what I'm saying.
I'm literally just wanting to do this as an exercise to help me understand the more advanced features of java. Nothing more. In the process I simply was stating that it would be nice to have a reference guide similar to google does for their scripts. While i'm already going through the code I might as well do that. 
My question was is it actually going to teach me anything?

Link to comment
Share on other sites

Depends on how much you already know.

 

If you have almost no knowledge of Java at all, you should go through a tutorial/course/JLS first, you won't learn what alien syntax means by just looking at it (unless you already know C# or the like).

If you have quite good knowledge of the syntax, but not the APIs or quirks (return-in-finally, reflection, ASM, unsafe, etc.), it is well worth going through some example code, for instance, ASM is used quite heavily in Forge. Still, expect to be reading lots of papers and manuals; the likes of ASM will hardly make any sense without a prior understanding of the internals of the JVM, ie. having at least skimmed through the JVMS.

If you already know how Java and all its quirks work, there is still a lot to learn in public domain code - best practices, keeping good code readability, algorithms and ideas. For example, once you already know how to render stuff in OpenGL, going through a few examples of how people have solved some rendering concepts will over time make you understand how to render your own shapes in the most efficient way (Though, rendering might not be the best example since it also requires a lot of knowledge outside the field of informational technology - math; rendering is a no-no without knowing trig and vectors).

 

TL;DR: You will profit from reading open-source code, if you already know the language syntax and API basics, if you don't, do a tutorial or something first.

Link to comment
Share on other sites

On 6/12/2017 at 1:57 PM, HashtagShell said:

Depends on how much you already know.

 

If you have almost no knowledge of Java at all, you should go through a tutorial/course/JLS first, you won't learn what alien syntax means by just looking at it (unless you already know C# or the like).

If you have quite good knowledge of the syntax, but not the APIs or quirks (return-in-finally, reflection, ASM, unsafe, etc.), it is well worth going through some example code, for instance, ASM is used quite heavily in Forge. Still, expect to be reading lots of papers and manuals; the likes of ASM will hardly make any sense without a prior understanding of the internals of the JVM, ie. having at least skimmed through the JVMS.

If you already know how Java and all its quirks work, there is still a lot to learn in public domain code - best practices, keeping good code readability, algorithms and ideas. For example, once you already know how to render stuff in OpenGL, going through a few examples of how people have solved some rendering concepts will over time make you understand how to render your own shapes in the most efficient way (Though, rendering might not be the best example since it also requires a lot of knowledge outside the field of informational technology - math; rendering is a no-no without knowing trig and vectors).

 

TL;DR: You will profit from reading open-source code, if you already know the language syntax and API basics, if you don't, do a tutorial or something first.

Perfect. Sounds like an ideal situation for me. 
I went to college and took HTML + CSS but mostly focused on Java and C++. I never quite got a niche anywhere with it and that wasn't my focus as far as degreewise.
I now work for a technology company and I really really want to get much better at coding in general. Beyond arrays loops and methods. I think this is a good place to start for sure!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.