Hello! And welcome to my UPDATED modding tutorial post. To start things off, we'll just do a new Block with the new updated ModLoader Requirements. Enjoy!
(links for all downloads are in the video description) [BLOCKS]
mod_ModTut
package net.minecraft.src;
public class mod_ModTut extends BaseMod
{
public void load()
{
ModLoader.RegisterBlock(tutblock);
ModLoader.AddName(tutblock, "Tutorial Block");
ModLoader.AddRecipe(new ItemStack(tutblock, 4), new Object[] {
"XX", "XX", Character.valueOf('X'), Block.cobblestone });
}
@MLProp(min=1.0D, max=1024D)
public static int tutblockID = 150;
//Initialization
public static Block tutblock;
//Block Definitions
static
{
tutblock = new BlockTutBlock(tutblockID, ModLoader.addOverride("/terrain.png", "/tut/tutblock.png")).setHardness(1.0F).setBlockName("tutblock").setResistance(10.0F);
}
public String getVersion()
{
return "Mod Tut V 1.0/Minecraft 1.0.0";
}
}
BlockTutBlock
package net.minecraft.src;
import java.util.Random;
public class BlockTutBlock extends Block
{
public BlockTutBlock(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return mod_ModTut.tutblock.blockID;
}
}
yes please make more tutorials. Every other tutorial I have followed has errors in coding, maybe because its for 1.4_01.
btw can you use this block to generate ore?
I can teach you guys how to do that too :3
I'll have to dig into the back of my brain because its been a long time since I've done ore generation lol. But yea, I will do.
Also I will split the videos up, I was going to originally but thought it might be easier to watch the whole thing at once.
Just like to say cheers for the video, really helped me get started. A little description into what Hardness and things do would be nice, also for the benefit of others could you put your code on here in code tags as 720p runs slowly for me, cheers (y).
But really thanks got it all working brilliantly, I'd have no clue where to start otherwise xd
Thanks a lot =] and yea, I'll get the code into the Original post asap. Thanks for viewing :biggrin.gif:
Very nice and informative, also glad to see i'm not the only one that has trouble typing lol. But seriously i'd like to see a video tutorial on how to make a block with different images on the sides, for instance, Top have wood image, one side have stone image and so on, or like the pumpkin where the front has a face and the sides are different and the top is also different.
Very nice and informative, also glad to see i'm not the only one that has trouble typing lol. But seriously i'd like to see a video tutorial on how to make a block with different images on the sides, for instance, Top have wood image, one side have stone image and so on, or like the pumpkin where the front has a face and the sides are different and the top is also different.
Absolutely No Problem :3
Quote from Pavel233 »
Help! Where there may be a mistake?
*** Minecraft Coder Pack Version 2.12 ***
MCP 2.12 running in C:\mcp
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_Derevo.java:20: cannot find symbol
symbol : class Blockderevo
location: class net.minecraft.src.mod_Derevo
derevo = new Blockderevo(200, ModLoader.addOverride("/terrain.png", "/dere
vo/derevo.png")).setHardness(0.5F).setResistance(5.0F).setBlockName("derevo");
^
1 error
Compiling Minecraft Server
=== MCP 2.12 recompile script finished ===
mod_Derevo
package net.minecraft.src;
import java.util.Random;
public class mod_Derevo extends BaseMod
{
public mod_Derevo()
{
ModLoader.RegisterBlock(derevo);
ModLoader.AddName(derevo, "Ore Derevo");
ModLoader.AddRecipe(new ItemStack(derevo, 4), new Object[] {
"XX", "XX", Character.valueOf('X'), Item.paper
});
}
public static Block derevo;
static
{
derevo = new Blockderevo(200, ModLoader.addOverride("/terrain.png", "/derevo/derevo.png")).setHardness(0.5F).setResistance(5.0F).setBlockName("derevo");
}
public String Version()
{
return "derevo 1.0";
}
}
Capitalize the Derevo it your derevo = new BlockDerevoblah blah =]
When I run startclient.bat Minecraft opens then it tells me it can't find the image file when trying to override it and crashes. But I am positive it is in the correct place (the same as the video)
Rollback Post to RevisionRollBack
Even if you fall on your face, you're still moving forward.
Victor Kiam
When I run startclient.bat Minecraft opens then it tells me it can't find the image file when trying to override it and crashes. But I am positive it is in the correct place (the same as the video)
did you put it in the temp folder? also make sure in your setOverride you start with "/blah blah", "/Blah blah"
make sure you have the slashes :3
(links for all downloads are in the video description)
[BLOCKS]
mod_ModTut
BlockTutBlock
Twitter
Blog
YouTube
Twitter
Blog
YouTube
btw, suggest you split up videos into 6 - 10 min videos. not everyone are willing to watch something so long.
btw can you use this block to generate ore?
I can teach you guys how to do that too :3
I'll have to dig into the back of my brain because its been a long time since I've done ore generation lol. But yea, I will do.
Also I will split the videos up, I was going to originally but thought it might be easier to watch the whole thing at once.
Thank you guys for the feed back :3
Twitter
Blog
YouTube
Thanks a lot =] and yea, I'll get the code into the Original post asap. Thanks for viewing :biggrin.gif:
Twitter
Blog
YouTube
mod_Derevo
Absolutely No Problem :3
Capitalize the Derevo it your derevo = new BlockDerevoblah blah =]
Twitter
Blog
YouTube
No Problem :3
Twitter
Blog
YouTube
Will ya post you're whole code? So I can check out a couple other things involved with it
Twitter
Blog
YouTube
I want to add new item, and gives this error:
mod_Derevo
Twitter
Blog
YouTube
Items are a little different =] I will show that in a video tonight =]
Twitter
Blog
YouTube
show me you're BlockSpiderSilk ;3
Twitter
Blog
YouTube
add a )
spidersilk = new BlockSpiderSilk(203, ModLoader.addOverride("/terrain.png", "/joeyjam/blocks/silkblock.png"))
like that :biggrin.gif:
Twitter
Blog
YouTube
When I run startclient.bat Minecraft opens then it tells me it can't find the image file when trying to override it and crashes. But I am positive it is in the correct place (the same as the video)
Victor Kiam
did you put it in the temp folder? also make sure in your setOverride you start with "/blah blah", "/Blah blah"
make sure you have the slashes :3
Twitter
Blog
YouTube