package net.minecraft.src; public class mod_mTest extends BaseMod { public static final StepSound soundGrassFootstep = new StepSound("grass", 1.0F, 1.0F); //This just recreates the already made grass sound in game. It must be remade here to use in any mod instantiation. //This puts our block into the game with the item ID 170 and a hardness of 0.0. When stepped upon this block will make a grass sound effect, and minecraft will locate this block's texture by searching for //whatever the unlocalized name is set to. Our block's texture name is "mTest01" public static final Block BlockmTest = new BlockmTest(170).setHardness(0.0F).setStepSound(soundGrassFootstep).setUnlocalizedName("mTest01"); /** *This will load all of the methods made below this method into the game. */ public void load() { register(); names(); crafting(); smelting(); shapeless(); } public String getVersion() //This is used whenever minecraft needs to ask for this mod's version. { return "1.5.2"; //This is the version of minecraft that the mod was created during. } public void register() //This registers blocks and items into the game. Implemented is an example of a block named "BlockmTest" being registered into the game. { ModLoader.registerBlock(BlockmTest); } public void names() //This will rename any block or item in game to what you set it to. Implemented is our block, BlockmTest, being renamed to Trip Mine for in game use. { ModLoader.addName(BlockmTest, "Trip Mine"); } /** *This sets the in game crafting recipe. Note that if you would like to make a space blank in the crafting recipe, you must leave its space blank here too. In total each row should have three characters, *regardless of whether you have spaces or not. */ public void crafting() { ModLoader.addRecipe(new ItemStack(BlockmTest, 1), new Object[] { "#I#", " T ", "#R#", Character.valueOf('#'), Block.cobblestone, Character.valueOf('I'), Item.ingotIron, Character.valueOf('T'), Block.tnt, Character.valueOf('R'), Item.redstone }); } public void smelting() //This can be changed to create a smelting recipe for your item or block. { } public void shapeless() //This is used for shapeless crafting. { } }