forum Forumsplay_arrow Minecraft fiber_manual_record Mods

1

Modding Block Help

1 emerald6 replies192 views
created 10/28/2012 3:27 pm by TeamPyro
last reply 10/29/2012 4:07 am
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 avatar
TeamPyro
Level 5 : Apprentice Architect
35

6 replies

1
10/29/2012 4:07 am
Level 34 : Artisan Modder
IAmChosen
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 48 : Master Narwhal
Boboonski
avatar
Only bump once every twenty four hours please.
1
10/28/2012 4:48 pm
Level 16 : Journeyman Modder
some1epic123
avatar
Yeah.
1
10/28/2012 4:44 pm
Level 5 : Apprentice Architect
TeamPyro
avatar
Bump.......
1
10/28/2012 4:31 pm
Level 5 : Apprentice Architect
TeamPyro
avatar
BUMP
1
10/28/2012 3:58 pm
Level 5 : Apprentice Architect
TeamPyro
avatar
BUMP

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome