• 1

    posted a message on TopoMC - generating Minecraft worlds from topographic data
    This looks fine and dandy, and I would love to use it, but it is so darn complicated.

    Can someone write a guide on how to make this work with Windows 7?

    I dont have time to search the interwebz for 5 hours slamming my head against the keyboard looking how to make this work.
    Posted in: Minecraft Tools
  • 7

    posted a message on [Creating Mods] [1.1] ModLoader and Forge Tutorials [2/7/12]
    Hello forum-goers, present and future modders, and various other purveyors of the interwebz...

    The past couple of weeks, I have been working on finalizing one of my mods. And as I traversed these forums, I realized that 99% of the tutorials out there are basically copy-paste, coolie cutter code. Being a student of programming myself, I know that this method is not good for learning and remembering how to program and mod.

    Therefore, I have decided to create this tutorial forum to be above the 99%, (No political puns intended). Not only am I going to teach you how to use MCP, ModLoader, ModLoaderMP, and Forge, but I also plan to teach you some actual Java programming, as to help you retain the information you pick up here. So, you dont need to have any prior programming knowledge.

    I will try to check this often enough, so as whatever questions you need answered, and I will try to help you as soon as I can.

    I will try to keep this updated and with new content whenever I have the time (between my mod, family, and a difficult junior year).

    So, without further delay:

    Installing MCP

    Prerequisites
    1. JDK and JRE SE 7u2 - Java
    2. MCP 5.* for Minecraft 1.1 - MCP
    3. Clean Install of Minecraft (Options->Force Update in Minecraft launcher)
    4. minecraft_server.jar from Minecraft (MUST be the .jar)
    5. ModLoader - Risugami's ModLoader
    6. ModLoaderMP (if you want your mod to be MP) - Flan's ModLoaderMP
    7. Minecraft Forge - (Recommended, but not required) - Minecraft Forge
    8. Eclipse IDE - Eclipse.org

    Installing Java
    1. Download both the JDK and JRE
    2. Install the JRE first, then the JDK
    3. Add the path variable, the path you need to add to this is the bin folder in the java install
    4. Windows 7/ Vista

      Select Computer from the Start menu
      Choose System Properties from the context menu
      Click Advanced system settings > Advanced tab
      Click on Environment Variables, under System Variables, find PATH, and click on it.
      In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.

      Windows XP


      Start -> Control Panel -> System -> Advanced
      Click on Environment Variables, under System Variables, find PATH, and click on it.
      In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
      Close the window.

    Installing MCP
    1. Unzip the mcp**.jar into a Folder (all of my tutorials will be in C:\Modding\)
    2. Drag the minecraft_server.jar and the resources and bin folder from .minecraft (type %appdata% in the run application), into the jars folder under your MCP install
    3. Install ModLoader and ModLoaderMP into bin/minecraft.jar and minecraft_server.jar in your MCP install (see the mod pages on how to install))
    4. Under your MCP install, run updatemcp.bat. You might have to run it twice (or until it says it is updated)
    5. Run decompile.bat. If you get IOError or exception2 (basically any error during the recompilation of the server), open up Minecraft_server.java in src/minecraft_server/net/minecraft/server and replace lines 400-431 with a "}"
    6. Run recompile.bat, you should get no errors
    7. If you got no errors, run updatemp5.bat BEFORE editing any sources (except to fix the exception2 error)
    8. If there are no errors in updatemp5.bat, unzip the forge.zip under the MCP install (put the "forge" folder in the same place as the "src", "jars", "temp", ect. folders)
    9. Under the forge folder, run install.bat and allow it to install. If it installs without breaking anything, we are ready to move onto the next part.

    Preparing Eclipse
    1. Install Eclipse under any folder you want
    2. Upon stating up Eclispe, select the workspace as the eclipse folder in the MCP install
    3. You should see Client and Server as the two folders on the left hand side of the screen (after closing the welcome screen in Eclipse)

    YOU MUST HAVE ECLIPSE, OR I WILL NOT HELP YOU WITH ERRORS. Trust me, eclipse is the best way to go when coding java. And it's free!

    Now we can start to teach you Java!


    Java - To be finished!

    Basics


    For teaching you the basics, were will be deconstructing the following code (you can enter this in eclipse in a new workspace):

    import java.util.*;
    
    public class TestClass{
        public int i1 = 1, i2 = 3;
        private double d1 = 1.0;
    
            public static void main(String[] args){
                System.out.println("This is some text");
                System.out.println("This is the value of i1: "+i1);
                System.out.println("This is the value of d1: "+d1);
                System.out.println("This is the value of i1 plus i2: "+add(i1, i2));
            }
    
            public int add(int x, int y){
                return x+y;
            }
    }


    Now lets break it down:

    Line 1
    import java.util.*;

    - This line imports the java utilities library "java.util", and all classes in that library ".*" (more on libraries later)
    - All java lines end with a semi-colon ";". This tells java it is done with that certain function.

    Line 3
    public class TextClass{

    - This is called a class header, as it defines a new class (all java files (that you need to worry about) have a class)
    - "public class" The public keyword tells java that the following object/primitive (more on that later) can be accessed in other classes and files. The class keyword just says that it is defining a class.
    - TestClass is just the name of the class. It can be anything you want.

    Line 4 - 5
    public int i1 = 1, i2 = 3;
    private double d1 = 1.0;

    - The int keyword tells java that it is defining a new int (integer), or any number without a fraction or decimals. The int i1 is being initialized (or assigned) to 1, and the int i2 is being initialized to 3.
    - The double keyword tells java that it is defining a new double, or a number that can have a decimal. The double d1 is being initialized to 1.0.

    Line 7
    public static void main(String[] args){

    - This is a method header. Java knows you are declaring a method because it has a return type (void)
    - You recognize the public keyword
    - Static ties the following object to the class (I'll explain this later)
    - void is the return type (what the method gives back, also more on this later), void means the method returns nothing
    - main is the name of the method (main is special in that this method automatically runs when you start the program)
    - A method is a group of code that runs at the same time and can return a certain object/primitive
    - A primitive is a build in java variable (like int or double)
    - (String[] args) are called the parameters(more details later)

    Line 8 - 11
    System.out.println("This is some text");
    System.out.println("This is the value of i1: "+i1);
    System.out.println("This is the value of d1: "+d1);
    System.out.println("This is the value of i1 plus i2: "+add(i1, i2));

    - This is a built in java method. System is the current computer system, out is a subdirectory, and println is a method. It takes the parameter "This is some text", and prints it out into the console.
    - In java, all Strings (a primitive type that stored text) are closed in quotation marks.
    - After the last quotation mark, you see +i1 and +d1. This adds the variables to the end of the String
    - Instead of printing "This is the value of i1: +i1" (without quotations), it will print "This is the value of i1: 1" (without quotations), because it prints the value of i1, not "i1".
    - The +add() is a method call. If you look at the add() method below, you will see that is returns a type of int instead of void. Because you call it in the System.out.println(), it will return in int. So like the last one, it will print "4" instead of "+add()"

    Line 12
    }

    - This ending bracket closed the main() method. Add classes, methods, and loops (we will cover later) that start with a "{" must eventually end with a "}"

    Line 13-15
    public int add(int x, int y){
        return x+y;
    }

    - This is a new method called add, which takes 2 parameters
    - In the main() method, you see that we are passing i1 and i2 into add()
    - In add() you see that it has (int x, int y). This means that by passing in i1 and i2, you are assigning i1 to x, and i2 to y.
    - Because the return type of add() is int, you need to use the return keyword to tell the method what to give back
    - This method is returning x+y. Basically, i1 equals 1 and i2 equals 3, so int x and int y were assigned 1 and 3, respectively, because i1 was passed in first and x was the first int in add(). So x+y is the same as i1+i2, or 1+3. Therefore, add() in this case would return 4. So back in main(), the fourth println method would print "This is the value of i1 plus i2: 4" (without quotations)


    This is the deconstruction of a basic java program. In the next section, I will go into more details and explain some more advanced ideas.

    Keywords and Definitions


    Definitions
    • Class - Each java file can have only 1 class (for now, but don't worry about that). This is the largest "container" that hold all variables, primitives, Objects, and methods.
    • Method - Group of code that will execute in order and can take parameters and return types.
    • Loops - Lines of code that will repeat themselves for a predetermined number of times.
    • Constructors - Creates a new object of a class (this is more advanced java)
    • Primitives - Built in java variables, the main ones are int (integer), double, String, char (holds a single character like 'A' or 't'), float (special type of decimal number), and Boolean (holds true or false)
    • Objects (Basic definition) - A generic term for any "thing" that isn't a variable (classes and almost every non-primitive fall under this)
    • Header - The line of text that contains the text that defines a new class or method.
    It helps to think of classes, methods, and loops as a filing cabinet.
    • The entire program is the filing cabinet.
    • Each individual class is a drawer in the filing cabinet.
    • A method is separate pockets in each drawer.
    • Each separate pocket (or method) has a bunch of papers.
    • Each piece of paper has one todo on it.
    • Java will do each todo in order from front to back, but may go to different folders (methods), or even different drawers (classes) to find another todo to help complete the current one (like calling the add() method in the above example, even though the main() method wasn't finished)


    Primitives
    int

    - Short for integer. This stores any number without fractions or decimals. It has a minimum value of -2,147,483,648 and a maximum value of 2,147,483,647. It must be a whole number.

    double

    - A double is any number with a decimal.

    float

    - A float is a shorter version of the double. It uses less memory and is usually used to represent small decimal numbers.

    String

    - A String stores a group of Text.

    long

    - This can store larger numbers than int, but it also uses much more memory. It has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807.

    boolean

    - This can only store true or false. It is also what is returned when using mathematical checks.

    char

    - Simply, it stores one single character.

    void

    - Not really a primitive, but if used as a return type, it means there is nothing being returned.

    There are other primitives, but most are only different variations of number storage.

    Keywords
    private

    - This tells java that the following object cannot be accessed outside of the current class. This is good for variables that are specific to a certain class.

    public

    - This tells java that the following object can be accessed outside the current class.

    class

    - This tells java that you are starting a new class.

    return

    - This tells the enclosing method that whatever follows this word is what the method should return. The return statement must match the return type.

    static

    - This binds the following object to the class. This is largely unimportant as of now.

    extends

    - This tells java that the class is inheriting classes from another class. Its not important to know how it works, just that you need to know this word to mod Minecraft.

    implements

    - Very similar to extends, but acts slightly differently. Also not important to go into details.

    new

    - Just tells java you are creating a new object.

    break

    - Used to break loops and statements. See the more advanced section for details.

    for, do, while

    - Loop keywords (see More Advanced)

    if, else if, else, switch, case

    - Conditional keywords (see More Advanced)

    Conditional & Math Operators

    Mathematical Operators
    ++, --, +=, -=

    - ++ adds one to the variable
    - -- subtracts one from the variable
    - += adds the number after the statement to the variable before the statement
    - -= subtracts the number after the statement from the variable before the statement

    Conditional Operators
    <=, <, >=, >, ==, !=, !

    - <= returns true if the variable before the operator is less than or equal to the second
    - < returns true if the variable before the operator is less than the second
    - >= returns true if the variable before the operator is greater than or equal to the second
    - > returns true if the variable before the operator is greater than the second
    - == returns true if the two variables are exactly equal
    - != returns true if the two variables are not equal
    - ! returns true only if the Boolean or condition after it is false, and false if the Boolean or condition after it is true (it basically switches true/false)

    Other Conditional Symbols
    ||, &&

    - || means "or", it is used in conditional statements
    - && means "and", it is also used in conditional statements

    More Advanced

    Not finished

    Conditional Statements

    - Conditional statements are used to run a chunk of code only if certain criteria are met. There are 2 main statements, if and switch statements.

    if
    - if(variable){}
    - else if(variable){}
    - else{}

    - If statements will run the entire group of code inside the brackets "{}", but only if the variable inside the "()" returns the proper value.
    - This is when you would use the conditional operators (>=,==,<=). This is used to check the variable for a value. You can compare a variable to a value, or a variable to another variable.
    - You can also use the other conditional symbols here to check more than one variable. (variable || variable) will run if either checks are true, (variable && variable) will only run if both checks are true.
    - else if just checks another set of variables.
    - else runs its code only if all of the other if and else if statements have not run. It takes no variables because it runs if all of the other variable checks are false.
    - if you do not have a else statement at the end, java wont run any more code if none of the other statements run and the code gets to where an else statement would be (basically, you dont need an else statement).
    - If using all three statements, if must be first, all else if statements (you can have an unlimited amount) must be next, and your else statement must be last
    - Once java runs a chunk of code, it will leave the conditional series. (Basically, if you have an if statement and 3 else if statements, and the code runs for the if statement, java wont even check to see if the rest of the else if statements are true)

    switch


    Loops
    Posted in: Tutorials
  • 4

    posted a message on [HELP NEEDED]MCP does not reobfuscate
    Glad I could help.
    Posted in: Modification Development
  • 9

    posted a message on [HELP NEEDED]MCP does not reobfuscate
    Ah, yes. This problem.

    I was having this very problem until I actually contacted the MCP team on irc.esper.net (their chat room)

    Here is what you must do (in this order):
    1. Get a fresh install of MCP (not required, but can help solve some problems, just make sure to back up any code changes you made))
    2. Run updatemcp.bat (You will need to run it twice, or until it says it is updated properly)
    3. Put everything you need into the jar folder, with the installed APIs (ModLoader and such)
    4. Run decompile.bat (This should create the files in the src folder and eclipse folder)
    5. BEFORE DOING ANYTHING ELSE, run updatemp5.bat. This will tell MCP what files to reobfuscate.
    6. Make changes to the code.
    7. Run recompile.bat
    8. Run reobfuscate.bat
    9. The prepped files will appear in the reobf folder. Only files you added or made changes to will show up here (because of the md5, which tells MCP what the original, unmodded files were)

    That should fix any problems you are having with files not appearing in the reobf folder.

    Hope I helped!
    Posted in: Modification Development
  • 1

    posted a message on [[[DIVIDED KINGDOM]]] Now Forming! Give your ideas! Free to play!
    This is mainly a post to see if people would be interested in helping give input to form a new server.

    We have the basis for our server already thought out, we just want input from those who may be willing to play on it.

    We we are going to have:
    • At least 3 teams.
    • Each team will have a capital city.
    • The server will be in the medieval time period.
    • Factions will have complete control over their diplomacy.
    • No item spawning, everything will be 100% legit.
    • There will be a safe area around the spawn point.
    • Although classes (with specific skills) wont be added unless there is a demand for it, we want to encourage each faction to assign people jobs.
    • Each capital will be run by a single leader, but individual factions can decide their governments.
    • There will be an official release date, so every faction can get on at the same time to found their capital cities.
    • The map will be rather large to make the distances between capital cities more realistic.
    • There will be a tiered payment system.
    • You will be able to play without paying, but donators get extra bonuses.
    • The map will not be spawned until after 1.8 to take advantage of the new map features.

    What we want out of this is a playing environment reminiscent of medieval Europe, with towns that look medieval.

    You can comment on these to explain why they shouldn't be there, or how to improve them, but these are mostly set in stone for the server.

    Some things that are contested (ideas from the server admins or players that we may incorporate):
    • Capital cities will have a small protected area within them that only faction members can edit.
    • The highest donator will get the position of king.
    • There will be a building code to keep all of the buildings era-appropriate.
    • A starting admin city will be built over the spawn point, then factions can raid after a certain date to get it's treasures.
    • The use of iConomy (comes down to a money-based or barter-based economy).
    • Capital cities will have set requirements to build a new town.
    • General code of war conduct (how to treat non-combatants, ect.).
    • "Gladiator" style area were there can be controlled fights with set rewards.



    These are only ideas, so these have a much better chance of being changed based on replies than the first list.

    Other than these sections, feel free to post ideas on what you think would make this server better. This includes plugin suggestions (we will be using very few plugins to limit server dependency), or any other idea you think should be added.

    We will be using Bukkit.

    If you want to see the plugins we will be using, just ask.

    We will release the pricing and website as we get more ideas set and ready.

    We look forward to hearing ideas from the community, even if you aren't going to play on this server.
    Posted in: Minecraft Survival Servers (archive)
  • To post a comment, please .