Minecraft Modding Guide

Minecraft Modding GuideEver since I started my Java Video Tutorial, I’ve received numerous requests from you to create a Minecraft Modding Guide. In this tutorial, I’ll show you how to setup everything you need to start making mods for Minecraft.

The steps are specific to the Mac platform, but everything is very similar for PCs. Actually it is easier to do this on a PC. The PC directions follow the video.

I thought this tutorial would nicely accompany my Java tutorial. I guess we’ll see

If you like videos like this tell Google
To make me extra happy, feel free to share it

Get Files Needed for Making Minecraft Mods

You obviously need a copy of Minecraft to create Minecraft Mods. You also need the following:

After you have downloaded the above, unzip them. The version of Eclipse I use is the Eclipse IDE for Java Developers. It’s free and works on every OS. Eclipse is very easy to install. Just double click it and follow the steps.

After you unzip the ModLoader and mcd56 files into folders, copy those folders and paste them in your Documents folder. If you’re on a PC copy them where ever you can easily find them.

Where is the minecraft.jar File

Now you have to copy the minecraft.jar file. On a MAC you’ll find it by:

  • In Finder click Go and then Go to Folder
  • Type the following in the popup ~/Library/Application Support/minecraft
  • Hit Enter
  • You’ll copy the bin folder (minecraft.jar is in /bin)

On a PC :

  • Click Start and then Run
  • Type %appdata% and click Enter
  • Browse through the window that opens to find the Minecraft folder
  • You’ll copy the bin folder (minecraft.jar is in /bin)

Copy bin Folder to Minecraft Coder Pack

Now that you have a copy of the bin folder from Minecraft, you need to paste it in the Minecraft Coder Pack folder. Go to where ever your mcp56 folder is located. Open the jars folder in mcp56 and paste the bin folder in there.

Decompress minecraft.jar

  • Create a temporary folder named untitled in the bin library
  • Copy minecraft.jar into it
On a PC, uncompress the minecraft.jar file with a program like WinRar into the untitled folder. Cut the original minecraft.jar file back into the bin folder. Rename it minecraftBU.jar. PC users are done with this step.

On a MAC, you need to open your terminal program. Open the bin folder you just pasted into mcp56. If you don’t know how type cd ~/Documents/mcp56/jars/bin/untitled in the terminal.

  • Type the following in the terminal: jar xf minecraft.jar
  • Cut minecraft.jar from the untitled folder
  • Paste it in the bin folder and rename it minecraftBU.jar

ModLoader

Copy all of the files in the ModLoader folder into the untitled folder. Replace all files when you get that error message.

On a PC compress the untitled folder using a tool like WinRar. Rename the file minecraft.jar and save it in the bin folder.

On a Mac select all the class files. Right click and select Compress. Rename the file Archive.zip, minecraft.jar and save it in the bin folder.

Almost Done

On a PC, locate the file named decompile.bat. It’s in your mcp56 folder. Double click it and wait for the decompile to complete.

On a Mac, locate the mcp56 folder in the terminal. Go there by typing cd ~/Documents/mcp56. Type bash decompile.sh in the terminal. Wait for the decompile to complete.

Setup Minecraft in Eclipse

This step is the same for Macs and PCs.

Open Eclipse

Click Browse

Locate the Eclipse folder in mcp56 and click OK

Now you can see / edit all of the code in Minecraft. You can also click the green run button in Eclipse to run your mods in Eclipse.

Leave any questions or comments below. If you want to learn more about Minecraft Modding you need to learn Java. I have a Java Video Tutorial to help you with that.

Till Next Time

Think Tank

 

 

 

6 Responses to “Minecraft Modding Guide”

  1. Paul says:

    WOW!!! IT WORKED!!!
    I had to rename the folder 1.6.4 to bin, and I renamed 1.6.4.jar to minecraft.jar
    But I finally got it to work!!!

    Thanks

  2. Tony Bilby says:

    Hey Derek, Do you happen to know anything about developing plugins for bukkit? I know the basics from playing around and made a pretty advanced plugin and I’m wanting to add a feature of a force-field that is relative to the user who turned it on and it would keep arrows, people (who aren’t op) and mobs like 4, 8, 10 meters away. If you know anything about this, do you have any idea what way I could accomplish this?

    • Derek Banas says:

      Hey Tony, Sorry, but I haven’t used it for a couple of years. I wish I could help. That sounds like a fun plugin you made 🙂

      • Tony Bilby says:

        Got it 🙂


        int range = 5;
        float power = 2;
        int force = 2;
        int yForce = 1;
        int maxYForce = 2;
        Player player = getServer().getPlayer(enableds.get(i));
        Vector p = player.getLocation().toVector();
        List entities = player.getNearbyEntities(range, range, range);
        Vector e, v;
        for (Entity entity : entities) {
        if (entity instanceof LivingEntity) {
        e = entity.getLocation().toVector();
        v = e.subtract(p).normalize().multiply(force / 10.0 * power);
        if (force != 0) {
        v.setY(v.getY() + (yForce / 10.0 * power));
        } else {
        v.setY(yForce / 10.0 * power);
        }
        if (v.getY() > (maxYForce / 10.0)) {
        v.setY(maxYForce / 10.0);
        }
        entity.setVelocity(v);
        }
        }

        this works really well, I’m going to add to this part if (entity instanceof LivingEntity with checking for arrows too to change the coarse of their velocity deflecting them also.

        The code itself I’ve made slightly more advanced with more features you can see here http://youtu.be/iKfVAX7eNHM 🙂

Leave a Reply

Your email address will not be published.

Google+