Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How did you learn to code?


gabrieldi
 Share

Recommended Posts

I've been struggling to learn to mod minecraft, but wasn't successful in finding useful resources to learn the stuff I need, which is to create structures and biomes. Every site/blog I find with tutorial is either too old or incomplete. Can someone help me with some useful resources for learning? I already know how to program I just wanted to find some places to really understand Minecraft code.

Link to comment
Share on other sites

Like Ugdhar says, the best thing is to learn to figure it out yourself. This is because that is what modding is based on. Other modders that write tutorials didn't learn it magically, rather they used their Java knowledge and inspected the vanilla code and then came up with ideas. Of course if you do find a tutorial then it is lucky, but just don't count on it. Also, unfortunately Minecraft has changed a lot over just a few years, and Forge continues to be revised as well, so tutorial information becomes outdated very quickly (I know because I try to write a lot of tutorial information).

 

The other thing is that many modders post their code on places like github and allow public access to it. So you can simply take your favorite mods and check their code as well to get ideas.

 

I'm honestly not much of an expert on world gen but I have a bit of information here you might want to think about: http://jabelarminecraft.blogspot.com/p/minecraft-forge-1721710-biome-quick-tips.html

 

I should warn you though that from a code perspective, the world gen is some of the hardest to fully understand. There are a lot of classes and methods with similar names, and the random generation can make it hard to really picture the execution logic just by reading it. But it is obviously a fun thing to mod so worth learning.

 

Note that in the end world gen is really just about placing blocks. So as long as you hook into the world gen process with a chunk generator, whether you follow the standard way of creating terrain, features and structures or just do your own is up to you. 

  • Like 1

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

18 hours ago, gabrieldi said:

useful resources for learning

Many mods have been put up at github. If you Google this forum for github references, you can follow the links to see examples of what other modders have done (some are better to emulate than others).

  • Like 1

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

To code, to program, or to mod.  Yes, I make a distinction between simply coding (writing technically valid code in some language) and programming (developing software to solve an actual problem).

 

I learned the basics of Java from a teach yourself in 21 days book, about 15 years ago.  Then, after being poor and without a computer for many years I re-learned Java from the official tutorials that Oracle has (https://docs.oracle.com/javase/tutorial/), though those might go a bit fast for someone who has never written code before.  Before that I'd learned Atari Basic, Pascal, and beginning C++ (in that order).  I was self-taught in all but Pascal (which I had a class on in high school), starting with Basic when I was in elementary school.

 

Really learning to program was then a mater of practice -- the more you do it that better you get.  Once you know the basics of a language, the thing to do is just start trying to do things with it.  No matter what books you read or videos you watch you will never really know how to program unless you put time into programming -- like any skill it requires practice.

 

As for modding, I watched some old videos by SweGoesMincraft (or something like that) which were for 1.6.4, to get the basics -- how to get Forge to recognize it as a mod, how to have Forge initialize it, etc.  For there it was a mater looking through the code and figuring things out.  This is also a skill; at first it can be hard -- Minecraft is most often not organized in the way I'd find most obvious.  But a lot of it was trying things and see if they worked, looking at error reports to track down anything that actually crashed, struggling to figure what was going wrong if I didn't get the results I wanted.  I remember the first time I got something to generate in game -- a quartz pillar though the middle of each chunk -- it seemed so cool that I'd made the game do *something*.  I then went on to have it build scattered empty rooms, then rooms with content, then whole procedural dungeons (my real goal), and at each step I felt good that I'd made it work.  That is how you learn to mod.

Edited by JaredBGreat
  • Like 1

Developer of Doomlike Dungeons.

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.