public class mod_iRawr extends BaseMod
{
/* Blocks */
public static final Block oreCobalt = new BlockOre(137,0).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep).setBlockName("oreCobalt");
public static final Block BlockElevantum = new Block(138,13, Material.rock).setHardness(5F).setResistance(5F).setStepSound(Block.soundMetalFootstep).setBlockName("blockElevantum");
/* Items */
public static final Item ingotCobalt = new Item(139).setIconIndex(1).setItemName("ingotCobalt");
//tools
public static final Item CobaltAxe = new ItemAxe(140, EnumToolMaterial.COBALT).setIconIndex(8).setItemName("axeCobalt");
public static final Item CobaltHoe = new ItemHoe(141, EnumToolMaterial.COBALT).setIconIndex(9).setItemName("hoeCobalt");
public static final Item CobaltSword = new ItemSword(142, EnumToolMaterial.COBALT).setIconIndex(10).setItemName("swordCobalt");
public static final Item CobaltShovel = new ItemSpade(143, EnumToolMaterial.COBALT). setIconIndex(11).setItemName("shovelCobalt");
public static final Item CobaltPickaxe = new ItemPickaxe(144, EnumToolMaterial.COBALT).setIconIndex(12).setItemName("pickaxeCobalt");
//Armor
public void load()
{
/* loads textures */
MinecraftForgeClient.preloadTexture("/iRawrMods/terrain/terrain.png");
/* Smelt */
ModLoader.addSmelting(oreCobalt.blockID, new ItemStack (ingotCobalt));
/* Generates custom blocks within the Over World */
public void generateSurface(World var1, Random random, int a, int
{
/*for (int e = 0; e < 20; e++ );
{
int posX = a + random.nextInt(16);
int posY = random.nextInt(12);
int posZ = b + random.nextInt(16);
(new WorldGenMinable(mod_iRawr.oreCobalt.blockID, 8)).generate(world, random, posX, posY, posZ);
}*/
for(int e = 0; e <15; e++);
{
int posX = a + random.nextInt(16);
int posY = random.nextInt(5 + 100);
int posZ = b + random.nextInt(16);
(new WorldGenMinable(mod_iRawr.oreCobalt.blockID, 8)).generate(var1, random, posX, posY, posZ);
}
}
public String getVersion()
{
return "Random";
}
private static GuiScreen creativeInventory;
}
this only applies to the Cobalt Ore and I'm using my own spritesheet in case u don't know and i put the sprite sheet into my minecraft.jar and as u can see i told it that I'm using it.
yeah i need to see those files
i know what's wrong i'm just trying to figure what your misconception came from
package net.minecraft.src;
import net.minecraft.src.forge.ITextureProvider;
import net.minecraft.src.forge.*;
public class CobaltOre extends Block implements ITextureProvider
{
public CobaltOre(int i, int j)
{
super(i, j, Material.rock);
this.blockIndexInTexture = j;
}
/* Puts item into the creative inventory */
public void addCreativeItems(java.util.ArrayList list)
{
if(blockID == mod_Rawr.oreCobalt.blockID)
{
list.add(new ItemStack(this));
}
}
/** do this for every block when using terrain and sprite indexes **/
public String getTextureFile()
{
return "/iRawrMods/terrain/spritesheet1.png";
}
}
the above is the code for CobaltOre
package net.minecraft.src;
import net.minecraft.src.forge.*;
import java.util.Random;
public class CobaltIngot extends Item
{
protected CobaltIngot(int i)
{
super(i);
}
/* Puts item into the creative inventory */
public void addCreativeItems(java.util.ArrayList list)
{
{
list.add(new ItemStack(this));
}
}
/** do this for every block when using terrain and sprite indexes **/
public String getTextureFile()
{
return "/iRawrMods/terrain/spritesheet1.png";
}
}
This one is the code for CobaltIngot just in caseHere is the mod_Rawr code again since i atm didn't know how to put it in special BBCode
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
import java.util.List;
import net.minecraft.client.Minecraft;
public class mod_Rawr extends BaseMod
{
/* Blocks */
public static final Block oreCobalt = new BlockOre(137,0).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep).setBlockName("oreCobalt");
public static final Block BlockElevantum = new Block(138,11, Material.rock).setHardness(5F).setResistance(5F).setStepSound(Block.soundMetalFootstep).setBlockName("blockElevantum");
public static final Block BlockElectrifierActive = new Block(145,12, Material.redstoneLight).setHardness(2F).setResistance(4F).setStepSound(Block.soundMetalFootstep).setBlockName("ElectrifierActive");
public static final Block BlockElectrifierIdle = new Block(146,13, Material.redstoneLight).setHardness(2F).setResistance(4F).setStepSound(Block.soundMetalFootstep).setBlockName("ElectrifierIdle");
/* Items */
public static final Item ingotCobalt = new Item(139).setIconIndex(1).setItemName("ingotCobalt");
//tool materials
static EnumToolMaterial toolCOBALT = EnumHelper.addToolMaterial("COBALT", 2, 450, 7F, 3, 15);
//tools
public static final Item shovelCobalt = (new ItemSpade(140, toolCOBALT)).setIconCoord(0,9).setItemName("shovelCobalt");
public static final Item pickaxeCobalt = (new ItemPickaxe(141, toolCOBALT)).setIconCoord(0,10).setItemName("pickaxeCobalt");
public static final Item axeCobalt = (new ItemAxe(142, toolCOBALT)).setIconCoord(0,6).setItemName("hatchetCobalt");
public static final Item swordCobalt = (new ItemSword(143, toolCOBALT)).setIconCoord(0,8).setItemName("swordCobalt");
public static final Item hoeCobalt = (new ItemHoe(144, toolCOBALT)).setIconCoord(0,7).setItemName("hoeCobalt");
//Armor
public void load()
{
//set Tool classes
MinecraftForge.setToolClass(pickaxeCobalt, "pickaxe", 2);
MinecraftForge.setToolClass(shovelCobalt, "shovel", 2);
MinecraftForge.setToolClass(axeCobalt, "axe", 2);
/* loads textures */
MinecraftForgeClient.preloadTexture("/iRawrMods/terrain/spritesheet1.png");
/* Smelt */
ModLoader.addSmelting(oreCobalt.blockID, new ItemStack (ingotCobalt));
/* Recipes */
ModLoader.addRecipe(new ItemStack(axeCobalt, 1), new Object[]{"yyx", "yzx", "xzx", 'y', ingotCobalt, 'z', Item.stick});
ModLoader.addRecipe(new ItemStack(hoeCobalt, 1), new Object[]{"yyx", "xzx", "xzx", 'y', ingotCobalt, 'z', Item.stick});
ModLoader.addRecipe(new ItemStack(swordCobalt, 1), new Object[]{"xyx", "xyx", "xzx", 'y', ingotCobalt, 'z', Item.stick});
ModLoader.addRecipe(new ItemStack(shovelCobalt, 1), new Object[]{"xyx", "xzx", "xzx", 'y', ingotCobalt, 'z', Item.stick});
ModLoader.addRecipe(new ItemStack(pickaxeCobalt, 1), new Object[]{"yyy", "xzx", "xzx", 'y', ingotCobalt, 'z', Item.stick});
ModLoader.addRecipe(new ItemStack(ingotCobalt, 1), new Object[]{"yxx", "xxx", "xxx", 'y', Block.dirt});
ModLoader.addRecipe(new ItemStack(BlockElectrifierIdle, 1), new Object[]{"yyy", "yzy", "yyy", 'y', Block.dirt, 'z', Block.planks});
/* Register */
ModLoader.registerBlock(oreCobalt);
ModLoader.registerBlock(BlockElevantum);
ModLoader.registerBlock(BlockElectrifierActive);
ModLoader.registerBlock(BlockElectrifierIdle);
ModLoader.setInGameHook(this, true, false);
/* Add Names */
ModLoader.addName(oreCobalt, "Cobalt Ore");
ModLoader.addName(ingotCobalt, "Cobalt Ingot");
ModLoader.addName(axeCobalt, "Cobalt Axe");
ModLoader.addName(hoeCobalt, "Cobalt Hoe");
ModLoader.addName(swordCobalt, "Cobalt Sword");
ModLoader.addName(shovelCobalt, "Cobalt Shovel");
ModLoader.addName(pickaxeCobalt, "Cobalt Pickaxe");
ModLoader.addName(BlockElevantum, "Elevantum");
ModLoader.addName(BlockElectrifierActive, "Electrifier");
ModLoader.addName(BlockElectrifierIdle, "Electrifier");
}
/* Generates custom blocks within the Over World */
public void generateSurface(World var1, Random random, int a, int
{
/*for (int e = 0; e < 20; e++ );
{
int posX = a + random.nextInt(16);
int posY = random.nextInt(12);
int posZ = b + random.nextInt(16);
(new WorldGenMinable(mod_Rawr.oreCobalt.blockID, 8)).generate(world, random, posX, posY, posZ);
}*/
for(int e = 0; e <15; e++);
{
int posX = a + random.nextInt(16);
int posY = random.nextInt(5 + 100);
int posZ = b + random.nextInt(16);
(new WorldGenMinable(mod_Rawr.oreCobalt.blockID, 8)).generate(var1, random, posX, posY, posZ);
}
}
public String getVersion()
{
return "Random";
}
private static GuiScreen creativeInventory;
}
If you are willing to help do you need the
.java files that go to the blocks and ingot?
this only applies to the Cobalt Ore and I'm using my own spritesheet in case u don't know and i put the sprite sheet into my minecraft.jar and as u can see i told it that I'm using it.
i know what's wrong i'm just trying to figure what your misconception came from
the above is the code for CobaltOre
This one is the code for CobaltIngot just in caseHere is the mod_Rawr code again since i atm didn't know how to put it in special BBCode