Blogs Tutorial

Modding Tutorial episode 1 - Blocks

  • 932 views 1 today
  • 8
  • 2
  • 66
gabe4356
Lvl 53Grandmaster Blob
204
Welcome to my modding tutorial episode 1!! here you will learn how to make mods with mod loader, i will also post forge tutorials as well! In this first tutorial i will teach you how to make blocks, so to start off we will first need to set up a workspace.

NOTE:You should learn some Java and Java Script, here

Setting up a workspace
So you will need to download eclipse from here
Then you will need to download mod loader from here
After that you will need to download MCP from here
Ok so now we can start setting the work space up. So run eclipse set the workspace to MCP > Eclipse
Now when you run eclipse there should a few folder's to the left of the screen
click the one labeled "Client" click src>net>minecraft>src
or you can always watch my video's on setting up your workspace below:





Your done setting up your workspace, you may now move on to coding!


Creating your block
ok so remember how we made the mod_test.class file earlier? double click that
now delete everything there and paste this:

package net.minecraft.src;
import java.util.Map;
import java.util.Random;
import java.util.*;

public class mod_test extends BaseMod
{

public static final Block Test = new Block(187, Material.clay).setHardness(4).setUnlocalizedName("TestBlock.png").setCreativeTab(CreativeTabs.tabBlock);

}

public String getVersion()
{
return "1.5.2";
}

public void load()
{

ModLoader.registerBlock(Test);
ModLoader.addName(Test, "Test Block");

}

}

then you need to make the texture, the canvas size should be 16x16 for a block
create a folder on your desktop named modTest
create a folder inside the folder you just made called textures
create a folder inside textures called blocks
save the texture as TestBlock.png inside the block folder you just made.
to test the mod first go into mcp751>jars>bin>minecraft.jar>textures>blocks and drag your block texture in there, now click the green button on the top left hand corner in eclipse [this starts minecraft] and your block should be in in creative tabs tab "blocks" .
now go inside mcp751 again, launch "recompile.bat" then launch "reobfusacate.bat"
now go inside rebof>minecraft and your reobfusicated minecraft code is now in there! drag all those files into modTest folder on your desktop. Your mod should be compatible with forge, but in order for it to work with forge, you need to make sure that its a zip file, and as soon as you open that zipped file all you your mod classes will apear there instead of a folder inside of there, then you install forge, and you drag your mod into your mods folder, and it should work.

and you could always watch my tutorial found here:



your done with your first mod!!!!!


How to install your mod
You would install your mod like any other mod loader mod, install mod loader, and drag your mod files into the minecraft.jar.


I hope you found this tutorial helpful!
If you get any crash reports or any bugs with your mod please comment below! [make sure to give me the entire crash report]

2 Update Logs

Update #2 : by gabe4356 07/22/2013 4:09:17 pmJuly 22, 2013 @ 8:09 pm UTC

.fixed up tutorial a bit
.made tutorial i bit more accurate
.neatened up the tutorial a little bit
.added videos
LOAD MORE LOGS

More like this

  Have something to say?

cezarromanul
03/15/2014 5:28 am
Level 1 : New Miner
sooo much comments,they arent visible!!
1
gabe4356
03/15/2014 8:44 am
Level 53 : Grandmaster Blob
lol
1
BPXRockU
03/06/2014 6:44 am
Level 16 : Journeyman Architect
Does this work for Mac? In the workspace I set it to MCP > Eclipse but I do not see folders on the left hand side? Where are the folders supposed to be?
1
gabe4356
03/06/2014 7:01 am
Level 53 : Grandmaster Blob
It will work. You just go to MC>Eclipse, and then that's where you select it.
1
Skylar1541+
01/13/2014 4:49 pm
Level 22 : Expert Mage
Awesome! I wish I could mod though, I just don't have th tie to learn Java. :(
1
gabe4356
01/13/2014 4:51 pm
Level 53 : Grandmaster Blob
lol
1
CatcaveisCool
07/20/2013 6:03 am
Level 35 : Artisan Artist
Best tut out there, making a mod soon!
1
gabe4356
07/20/2013 10:24 am
Level 53 : Grandmaster Blob
Thanks!!!!
1
matti2000rocks
07/20/2013 5:44 am
Level 21 : Expert Caveman
You have to set up a Java path too
1
gabe4356
07/20/2013 10:23 am
Level 53 : Grandmaster Blob
thats already in eclipse.
1

Welcome