Step 1: Learning Java

Java is a programming language, I would think most people know that, as you are playing a game that was made solely in that language. Java is known as an object oriented programming language, which means that it is made up of two main data structures.. FIELDS and METHODS. You can think of fields and methods like this people: The human as a whole could be considered a project (wow, this is a bad analogy). In the project we have packages (yes, girls too), such as "human.body.head". In the packages contain classes, which we can manipulate later - for example would be a class. Now, finally we have fields and methods, which go in the classes. An example of a field you might find in the ear class would be earLobeHeight or listeningVolume. An example of a method you might find in the ear class might be listenTo() or moveEars(). What does this look like, you might be asking. You might also be asking what does this look like in minecraft. Well here's an example: Method Example
public int getMaxHealth() {     return 20; }

This is a method from the class in minecraft. It is very basic, and all you need to worry about for now is that when you change the 20 to something else, as you might expect, it changes how many times you can whack a creeper before it dies. The public means that any other class can access this method, the int means that the method will provide an integer (any number containing no decimals between +/- 2,147,483,647), the getMaxHealth() is the name of the method, and return 20 means that when someone asks this class what is the creeper's max health, it will return saying "20". Because we stated "int" in the method, we must return an integer. Field/Variable Example
private double velocityY;
That is a field declared (basically means set up) in the EntityMinecart class. The word private means that only that class can access the field, the word double means that it can be a decimal number, and the velocityY is the name of the variable (variable and field mean the same thing). So that's the bare, BARE basics of java (Not even scratching the surface), but there are so many great java tutorials out there (youtube or google it) that I don't feel like I would do them any justice. Here's a couple that I learned a lot from: TheNewBoston's Java (Absolute Beginner) Programming Tutorials Bucky's Video Tutorials TheNewBoston's Java (Intermediate) Programming Tutorials Bucky's Video Tutorials The Java™ Tutorials (Intermediate to Advanced) The Java™ Tutorials

Back to Tutorials Index                 Next

external links