Welcome to Legend Modding Tutorials, celebrating 4,900 views in just 1 and a half months! I am learning how to mod and I thought that creating this thread would help me learn. So far I have made eight tutorials, two of which has been updated to 1.5.1. If you use my tutorials and have any crashes, just post them and I will try to help you out. I am working on updating and organizing the tutorials, as well as creating a website which should be released on April 30. Check back soon for more!
Since the changing of the "Tutorials" section, this topic in the archive will serve as replacement until I am able to port the thread. Post your crash reports here. Thank you!
Coming Soon:
- Port to new section
- All tutorials updated to 1.5.1
- Custom Foods
- Ore Generation
- Custom Tools
Windows: Double-click on the install.cmd file
Mac/Linux: Open Terminal and type "bash". Then hit space and drag in the "install.sh" file. Press enter.
The decompiling processes should begin. It takes about 5-10 minutes. You are ready to begin coding.
Opening Eclipse:
To begin, open Eclipse inside the "eclipse.zip" file that generated when you downloaded Eclipse. If you are on a Windows computer, you will need a zip opener software. Where it asks you for a workspace, navigate to the "eclipse" folder inside your "mcp" folder inside your "forge" folder. Click OK.
Once Eclipse loads, click on the arrow next to "Minecraft", then "src". Click on "src" and go to "File>New>Package". Name your package like so:
yourname.yourmodname
Then go to "File>New>Class". Name this
YourMod
Click OK. Now you can begin to code!
Creating Base Classes
To start, replace the code that generated with your class to this:
package yourname.yourmodname;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid="YourMod", name="Your Mod", version="0.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class YourMod {
@Instance("YourMod")
public static YourMod instance;
@SidedProxy(clientSide="yourname.yourmodname.client.ClientProxy", serverSide="yourname.yourmodname.CommonProxy")
public static CommonProxy proxy;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
proxy.registerRenderers();
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
}
}
If you want, you can leave it at that, replacing all of the necessary content, and move on to the next section. Or you can read the below section explaining all the code.
Explaining The Code:
package yourname.yourmodname;
This is the location of your code.
import cpw.mods.fml.common.Mod…
This gives you access to a lot of the code we will use in this tutorial.
clientSideRequired: asks if you need the mod on the client to play the mod (should be true)serverSideRequired: asks if you need the mod on the server to play the server (should be false)
public class YourMod
This is your mod's class file.
@Instance
This is the code "object" that Forge uses. It needs to be the same as the "modid" from above.
@SidedProxy
Tells the location of your proxies (see next section)
@PreInit
Tells Forge what to generate in configuration files
@Init
Here you put all of the data that should be loaded with your mod, much code is implemented in this method
@PostInit
This is where you put everything that is used with other mods.
Done! Next you will have to create the proxies (next section)
Creating Proxies
Now you will need to create proxies for your mod to run. First, create a new class in your original package. Name it CommonProxy. Replace all code with the following:
package yourname.yourmodname;
public class CommonProxy {
public void registerRenderers() {
}
}
Explaining The Code:
package yourname.yourmodname;
You should know what this means by now. If not, read back a section.
public class CommonProxy {
You should also know the meaning of this code.
public void registerRenderers() {}
This allows the textures to be rendered.
Now, create your next proxy. First, make a new package and call it:
yourname.yourmodname.client
Then, create the ClientProxy class inside it. Type the following code:
package yourname.yourmodname.client;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraftforge.client.MinecraftForgeClient;
import yourname.yourmodname.CommonProxy;
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
}
}
Explaining The Code:
public class ClientProxy extends CommonProxy {
This means that ClientProxy will add or change the code of the CommonProxy.
@Override
public void registerRenderers() {
This is where we will override the CommonProxy's register Renderers method.
Now you are ready to learn how to customize your Minecraft experience!
Basic Blocks
Prerequisites:
Complete Beginning Your Mod
YourBlock Class:
This will be very similar to creating an item. To begin, make a new class in your package. Call it "YourBlock". Type the following code:
package yourname.yourmodname;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.util.Icon;
public class YourBlock extends Block {
public YourBlock(int id, Material material) {
super(id, material);
setHardness(3.0F);
setStepSound(Block.soundStoneFootstep;
setCreativeTab(CreativeTabs.tabBlock);
}
@Override
public void registerIcons(IconRegister par1IconRegister) {
blockIcon - par1IconRegister.registerIcon("yourname:yourmodname:youritem");
}
}
Explaining The Code:
public YourBlock {
This is where we store all of the info about the block.
super(id, texture, material);
. This makes it so we can change all of these things.
setHardness
This is the hardness of your block. Best explained at the Minecraft Wiki.
setStepSound
This is the sound your block makes when it is stepped on, placed, or broken.
setCreativeTab(CreativeTabs.tabBlock)
This is the tab the block is under in creative mode.
public void registerIcons
This registers the texture file of the block.
You are ready to register your block in the base class.
YourMod Class
We will be adding to the first class you made. To start, add this into the import list:
The first piece of code is all of the information about the block. It is pretty self-explanatory. The material is the block's material and the setUnlocalizedName is the name of the block in code. The next piece is registering the block's name. The third is what is required to mine your block. The first field is your block's name. The second is the harvest level. 0 is wood, 1 is stone, 2 is iron, and 3 is diamond. The third is the tool used to mine the block. You can put "pickaxe", "shovel", or "axe" in the third field.
Your final class should look like this:
package yourname.yourmodname;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import net.minecraft.block.Block
import net.minecraft.block.material.Material;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraftforge.common.MinecraftForge;
@Mod(modid="YourMod", name="Your Mod", version="0.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class YourMod {
@Instance("YourMod")
public static YourMod instance;
@SidedProxy(clientSide="yourname.yourmodname.client.ClientProxy, serverSide="yourname.yourmodname.CommonProxy)
public static CommonProxy proxy;
public static Block yourBlock;
int yourBlockID = 150;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
yourBlock = new YourBlock(yourBlockID, Material.rock).setUnlocalizedName("yourBlock");
LanguageRegistry.addName(yourBlock, "Your Block");
MinecraftForge.setBlockHarvestLevel(yourBlock, 0, "pickaxe");
GameRegistry.registerBlock(yourBlock, "yourBlock");
proxy.registerRenderers();
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
}
}
Done! You've made a custom block!
1.4.7 Tutorials: Basic Items
Prerequisites:
Complete Beginning Your Mod
YourItem Class
To begin creating an item, make a new class in your package. Call it "YourItem". Replace the code with the following:
package yourname.yourmodname;
import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;
public class YourItem extends Item {
public YourItem(int id) {
super(id);
setMaxStackSize(64);
setCreativeTab(CreativeTabs.tabMisc);
setIconIndex(0);
setItemName("yourItem");
}
public String getTextureFile() {
return CommonProxy.ITEMS_PNG;
}
}
Explaining The Code:
public YourItem {
This is where we store all of the info about the item.
super(id);
. This makes it so we can change the id.
setMaxStackSize
This is the amount of your item in one stack.
setCreativeTab
This tells which tab in creative mode the item goes under.
setIconIndex
This is the id of the item's texture in the texture file.
setItemName
This tells the item's name in the code. (Not in the game)
getTextureFile
This is the texture file used.
Now you are ready to add your item to your base class.
YourMod Class
We will be adding to the first class you made. To start, add this into the import list:
private static final Item yourItem = new YourItem(5000);
This is just adding the item into the main code. The 5000 is the ID. Then, add this in the "@Init" method:
LanguageRegistry.addName(yourItem, "Your Item");
This just states the item's in-game name.
Your final class should look like this:
package yourname.yourmodname;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="YourMod", name="Your Mod", version="0.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class YourMod {
@Instance("YourMod")
public static YourMod instance;
private static final Item yourItem = new YourItem(5000);
@SidedProxy(clientSide="yourname.yourmodname.client.ClientProxy, serverSide="yourname.yourmodname.CommonProxy)
public static CommonProxy proxy;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
LanguageRegistry.addName(yourItem, "Your Item");
proxy.registerRenderers();
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
}
}
Done! You've made a custom item!
Custom Textures
Creating your textures
You will need two .png files: block.png and items.png. In these files you will hold all of your textures. Once you recompile and reobfuscate your mod (tutorial coming soon) then add these files into the location that can be found in your CommonProxy. That's all you need to make textures.
Recompiling Your Mod
Prerequisites
Have a working mod
Recompiling
Once you have a working mod with no errors, find your "forge" folder with the mod inside.
Windows: just double-click the "recompile.bat" inside the "mcp" folder. Then, double-click the "reobfuscat.bat" file. Your files can be found in the "reobf" folder.
Mac and Linux: Open Terminal, type "cd " and drag in your "mcp" folder. Press enter. Then, type "bash recompile.sh". Wait for the recompiling to complete, then do the same thing with the "reobfuscate.sh" file. You can find your mod folders inside the "reobf" folder.
Done! Your mod can now be distributed!
Crafting Recipes
Prerequisites
Complete Tutorial 2
ItemStacks
To begin, type the following line in your @Init method:
ItemStack stoneStack = new ItemStack(Block.stone);
This registers a new ItemStack. For items, just use Item.(diamond) instead of Block.(stone). If you have a custom block or item, just replace Block.stone with the name of your block or item.
Shaped Recipes
Now that you have made your ItemStacks, type the following line of code:
GameRegistry.addRecipe(new ItemStack(stoneStack), " x ", " x ", " x ", 'x', diamondStack);
The first stoneStack is the block that you receive from the recipe. You can make 2x2 and 3x3 recipes in this format. Where you see the " x ", use spaces to represent blank spots. You can replace the x with any letter. The last x shows that the value of x is the diamondStack. For more complex recipes, look here:
Very great tutorial ! I've seen many tutorials but this makes me understand the code, and that was what i was looking for
Also a little request! Can you maybe add a structure generation tutorial, and dungeon structure (with loot) tutorial
Thank you, adding new structures sounds fun but also more advanced - I could make it relatively soon, but there are a few more tuts I'm putting up first.
Help !
My minecraft chrashes when i try to start my mod =?
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: yourname.yourmodname.client.ClientProxy
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:161)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:410)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:744)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: yourname.yourmodname.client.ClientProxy
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:185)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:57)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:52)
... 27 more
Caused by: java.lang.NullPointerException
at org.objectweb.asm.ClassReader.(Unknown Source)
at net.minecraftforge.transformers.EventTransformer.transform(EventTransformer.java:29)
at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:228)
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:173)
... 33 more
--- END ERROR REPORT e3743eca ----------
That's really weird, but I see the problem in the crash - it's reading your ClientProxy as missing. Did you recompile and reobfuscate correctly? Something might have been wrong. Check if you can find the ClientProxy class in your mod. This happened to me too. Try installing version 6.6.0.497 of forge and see if that works. You can get it at files.minecraftforge.net
Maybe its just me that don't understand the setup right :/ can you maybe make a video instead =?
I don't think so. It's probably just a problem with Forge... ...have you tried installing the other version of Forge? I don't think I could make a video, unfortunately...
Okay thanks and how do i install eclipse? I have forge all installed up, but when I click on eclipse.exe this is what happens, http://min.us/lCpUrB1sO0WKF
How do I fix this? I have a Win. 7 computer and I really want to mod, please help!
Okay thanks and how do i install eclipse? I have forge all installed up, but when I click on eclipse.exe this is what happens, http://min.us/lCpUrB1sO0WKF
How do I fix this? I have a Win. 7 computer and I really want to mod, please help!
I see, you need to install JDK. I must have forgotten to put that in the tutorials, but now it's in! Just download it and you will be fine…. it's located in the first tutorial.
After recompiling and reobfuscating the code how do you install the mod into the minecraft jar so that you can test it?
Install Forge by opening the minecraft.jar with a zip archive program such as WinRar or 7Zip, and download Forge. Then, drag the files from Forge into the minecraft.jar. Run Minecraft and you should see a new mods folder inside your .minecraft one. Drag the folder inside the Minecraft folder inside the reobf folder inside the mcp folder of your mod into the mods folder. Run Minecraft, enjoy!
Sorry if you don't understand this tutorial, I typed it really quick!
i have two errors in Eclipse and i don´t know nothing more of java than this :/
in my mod class, where i put "proxy.registerRenderers();" says "the method registerRenderers() is undefined for the type CommonProxy"
and in ClientProxy.class, where i put "public void registerRenderers() {" it says "The method registerRenderers() of type ClientProxy must override or implement a supertype method" and "Method breakpoint:Clientproxy [entry] registerrenderers()"
a little help would be.... helpful
(sorry...Bad english, i originally speak spanish)
i have two errors in Eclipse and i don´t know nothing more of java than this :/
in my mod class, where i put "proxy.registerRenderers();" says "the method registerRenderers() is undefined for the type CommonProxy"
and in ClientProxy.class, where i put "public void registerRenderers() {" it says "The method registerRenderers() of type ClientProxy must override or implement a supertype method" and "Method breakpoint:Clientproxy [entry] registerrenderers()"
a little help would be.... helpful
(sorry...Bad english, i originally speak spanish)
I think you forgot a few lines of code or something. Could you please post the code you used? Thanks.
Great tutorial, this really helped me . I was wondering if you're going to make tutorials for container blocks (like furnaces) and meta-blocks, because I really want to make a custom furnace.
Great tutorial, this really helped me . I was wondering if you're going to make tutorials for container blocks (like furnaces) and meta-blocks, because I really want to make a custom furnace.
Thanks! As you probably know, this tutorial page was just made, so I haven't been able to make that many tutorials. I'll probably have a gui tutorial soon.
I think you forgot a few lines of code or something. Could you please post the code you used? Thanks.
ok
ManxiosaSugared.class
package manxiosa.manxiosasugaredmod;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="ManxiosaSugared", name="Manxiosa Sugared Mod", version= "1.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class ManxiosaSugared {
@Instance("ManxiosaSugared")
public static ManxiosaSugared instance;
private static final Item Pot = new ItemPot (12200);
@SidedProxy(clientSide="manxiosa.manxiosasugaredmod.client.ClientProxy",
serverSide="manxiosa.manxiosasugaredmod.CommonProxy")
public static CommonProxy proxy;
@PreInit
public void PreInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
LanguageRegistry.addName(Pot, "Pot");
proxy.registerRenderers();
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
}
}
ClientProxy.class
package manxiosa.manxiosasugaredmod.client;
import net.minecraftforge.client.MinecraftForgeClient;
import manxiosa.manxiosasugaredmod.CommonProxy;
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
MinecraftForgeClient.preloadTexture(ITEMS_PNG);
MinecraftForgeClient.preloadTexture(BLOCK_PNG);
}
}
CommonProxy.class
package manxiosa.manxiosasugaredmod;
public class CommonProxy {
public static String ITEMS_PNG="/manxiosa/manxiosasugaredmod/itemmnxa.png";
public static String BLOCK_PNG="/manxiosa/manxiosasugaredmod/terrainmnxa.png";
public void registerRenderes() {
}
}
ItemPot.class
package manxiosa.manxiosasugaredmod;
import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;
public class ItemPot extends Item {
public ItemPot(int id) {
super (id);
setMaxStackSize(64);
setCreativeTab(CreativeTabs.tabMisc);
setIconIndex(0);
setItemName("Pot");
}
public String getTextureFile() {
return CommonProxy.ITEMS_PNG;
}
}
Since the changing of the "Tutorials" section, this topic in the archive will serve as replacement until I am able to port the thread. Post your crash reports here. Thank you!
Coming Soon:
- Port to new section
- All tutorials updated to 1.5.1
- Custom Foods
- Ore Generation
- Custom Tools
1.5.1 Tutorials:
Beginning Your Mod
Prerequisites:
Download Minecraft Forge (Recommended SRC Build)
Download JDK (Windows + Linux Only)
Download Eclipse (Choose OS)
Setting Up Forge:
Mac/Linux: Open Terminal and type "bash". Then hit space and drag in the "install.sh" file. Press enter.
The decompiling processes should begin. It takes about 5-10 minutes. You are ready to begin coding.
Opening Eclipse:
Once Eclipse loads, click on the arrow next to "Minecraft", then "src". Click on "src" and go to "File>New>Package". Name your package like so: Then go to "File>New>Class". Name this Click OK. Now you can begin to code!
Creating Base Classes
Explaining The Code:
This is the location of your code.
This gives you access to a lot of the code we will use in this tutorial.
This gives Forge a little more information on your mod that will be displayed on the "mods" page in Minecraft. clientSideRequired: asks if you need the mod on the client to play the mod (should be true)serverSideRequired: asks if you need the mod on the server to play the server (should be false)
This is your mod's class file. This is the code "object" that Forge uses. It needs to be the same as the "modid" from above.
Tells the location of your proxies (see next section)
Tells Forge what to generate in configuration files
Here you put all of the data that should be loaded with your mod, much code is implemented in this method
This is where you put everything that is used with other mods.
Done! Next you will have to create the proxies (next section)
Creating Proxies
Explaining The Code:
You should know what this means by now. If not, read back a section.
You should also know the meaning of this code.
This allows the textures to be rendered.
Now, create your next proxy. First, make a new package and call it: Then, create the ClientProxy class inside it. Type the following code:
Explaining The Code:
This means that ClientProxy will add or change the code of the CommonProxy.
This is where we will override the CommonProxy's register Renderers method.
Now you are ready to learn how to customize your Minecraft experience!
Basic Blocks
Prerequisites:
Complete Beginning Your Mod
YourBlock Class:
This is where we store all of the info about the block.
. This makes it so we can change all of these things.
This is the hardness of your block. Best explained at the Minecraft Wiki.
This is the sound your block makes when it is stepped on, placed, or broken.
This is the tab the block is under in creative mode.
This registers the texture file of the block.
You are ready to register your block in the base class.
YourMod Class
Your final class should look like this:
Done! You've made a custom block!
1.4.7 Tutorials:
Basic Items
Complete Beginning Your Mod
YourItem Class
This is where we store all of the info about the item.
. This makes it so we can change the id.
This is the amount of your item in one stack.
This tells which tab in creative mode the item goes under.
This is the id of the item's texture in the texture file.
This tells the item's name in the code. (Not in the game)
This is the texture file used.
Now you are ready to add your item to your base class.
YourMod Class
Your final class should look like this:
Done! You've made a custom item!
Custom Textures
Creating your textures
Recompiling Your Mod
Prerequisites
Recompiling
Windows: just double-click the "recompile.bat" inside the "mcp" folder. Then, double-click the "reobfuscat.bat" file. Your files can be found in the "reobf" folder.
Mac and Linux: Open Terminal, type "cd " and drag in your "mcp" folder. Press enter. Then, type "bash recompile.sh". Wait for the recompiling to complete, then do the same thing with the "reobfuscate.sh" file. You can find your mod folders inside the "reobf" folder.
Done! Your mod can now be distributed!
Crafting Recipes
Prerequisites
ItemStacks
Shaped Recipes
Ok, I will probably do that in a week or so, because I'm planning to do blocks, items, and recipes first. Thanks!
Thank you, adding new structures sounds fun but also more advanced - I could make it relatively soon, but there are a few more tuts I'm putting up first.
That's really weird, but I see the problem in the crash - it's reading your ClientProxy as missing. Did you recompile and reobfuscate correctly? Something might have been wrong. Check if you can find the ClientProxy class in your mod. This happened to me too. Try installing version 6.6.0.497 of forge and see if that works. You can get it at files.minecraftforge.net
I don't think so. It's probably just a problem with Forge... ...have you tried installing the other version of Forge? I don't think I could make a video, unfortunately...
You can't make a sword, unfortunately... but I'll add a tutorial for that soon.
How do I fix this? I have a Win. 7 computer and I really want to mod, please help!
I see, you need to install JDK. I must have forgotten to put that in the tutorials, but now it's in! Just download it and you will be fine…. it's located in the first tutorial.
Install Forge by opening the minecraft.jar with a zip archive program such as WinRar or 7Zip, and download Forge. Then, drag the files from Forge into the minecraft.jar. Run Minecraft and you should see a new mods folder inside your .minecraft one. Drag the folder inside the Minecraft folder inside the reobf folder inside the mcp folder of your mod into the mods folder. Run Minecraft, enjoy!
Sorry if you don't understand this tutorial, I typed it really quick!
in my mod class, where i put "proxy.registerRenderers();" says "the method registerRenderers() is undefined for the type CommonProxy"
and in ClientProxy.class, where i put "public void registerRenderers() {" it says "The method registerRenderers() of type ClientProxy must override or implement a supertype method" and "Method breakpoint:Clientproxy [entry] registerrenderers()"
a little help would be.... helpful
(sorry...Bad english, i originally speak spanish)
I think you forgot a few lines of code or something. Could you please post the code you used? Thanks.
Thanks! As you probably know, this tutorial page was just made, so I haven't been able to make that many tutorials. I'll probably have a gui tutorial soon.
ok
ManxiosaSugared.class
ClientProxy.class
CommonProxy.class
ItemPot.class
u///u thank you so much