Reently I started making a mod, the first block a created was a block of redstone and it worked. Then I attempted to make the recipe for it but minecraft keeps crashing, here are the two files
Mainfile:
blockRedstone file:
Help me and I give you credits in the description of my offical mod.
Mainfile:
package piccoMod.common;
import net.minecraft.src.Block;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = "Picco_PiccoMod", name = "The Picco Mod",version = "0.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Mainfile
{
public static Block redstoneBlock;
@Init
public void load(FMLInitializationEvent event)
{
//Blocks\\
redstoneBlock = new blockRedstone(501, 0).setBlockName("redstoneBlock");
GameRegistry.registerBlock(redstoneBlock);
LanguageRegistry.addName(redstoneBlock, "Block of Redstone");
//Recipes\
GameRegistry.addRecipe(new ItemStack(blockRedstone.blockRedstone), new Object[]
{
"XXX", "XXX", "XXX", 'X', Item.redstone
});
}
}
blockRedstone file:
package piccoMod.common;
import net.minecraft.src.Block;
import net.minecraft.src.BlockOreStorage;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Material;
public class blockRedstone extends Block
{
public static Block blockRedstone = (new BlockOreStorage(501, 24)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundMetalFootstep).setBlockName("blockRedstone");
public blockRedstone(int par1, int par2)
{
super(par1, par2, Material.iron);
this.setCreativeTab(CreativeTabs.tabBlock);
}
}
Help me and I give you credits in the description of my offical mod.
Create an account or sign in to comment.
6
1
It would be a lot easier if I could get the error, instead of sifting through your code.
1
Only bump once every twenty four hours please.
1
Yeah.
1
Bump.......
1
BUMP
1
BUMP