1

Modding Block Help

TeamPyro's Avatar TeamPyro10/28/12 3:27 pm
1 emeralds 260 6
10/29/2012 4:07 am
IAmChosen's Avatar IAmChosen
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:
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.
Posted by TeamPyro's Avatar
TeamPyro
Level 8 : Apprentice Architect
35

Create an account or sign in to comment.

6

1
10/29/2012 4:07 am
Level 36 : Artisan Modder
IAmChosen
IAmChosen's Avatar
It would be a lot easier if I could get the error, instead of sifting through your code.
1
10/28/2012 4:46 pm
Level 49 : Master Narwhal
Boboonski
Boboonski's Avatar
Only bump once every twenty four hours please.
1
10/28/2012 4:48 pm
Level 23 : Expert Modder
some1epic123
some1epic123's Avatar
Yeah.
1
10/28/2012 4:44 pm
Level 8 : Apprentice Architect
TeamPyro
TeamPyro's Avatar
Bump.......
1
10/28/2012 4:31 pm
Level 8 : Apprentice Architect
TeamPyro
TeamPyro's Avatar
BUMP
1
10/28/2012 3:58 pm
Level 8 : Apprentice Architect
TeamPyro
TeamPyro's Avatar
BUMP
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome