1

Help With Code Please!

1 emerald 3 replies 98 views | started 04/10/2012 10:01 pm by Azthat
Hi, I'm trying to do a new ore mod and this is my code:

public class mod_Amber extends BaseMod{


private static BlockAmber = new BlockAmber(488).setBlockName("Amber");


public mod_Amber()
{

ModLoader.AddName(Amber, "Amber");

Amber.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Amber.png");

ModLoader.RegisterBlock(Amber);

ModLoader.AddRecipe(new ItemStack(Amber,1), new Object[]
{"#",Character.valueOf('#'),Block.dirt});
}
@Override
public String Version() {

return "v0.1";
}
}


It says I have 1 error in:
private static BlockAmber = new BlockAmber(488).setBlockName("Amber");
^

please help I want to know how to do mods

THANKS
Posted by avatar
Azthat
Level 1 : New Miner
0

3 replies

1
04/16/2012 3:03 pm
Level 1 New Miner
ZombieMike
avatar
Most of modloader's *thingys* now begin lowercase
for example;
'AddName' Is now 'addName'
'GenerateSurface' is 'generateSurface'
It also applies to addRecipe addSmelting and a few other ones
1
04/10/2012 10:11 pm
Level 1 New Miner
Azthat
avatar
My BlockAmber.class code is this:

package net.minecraft.src;

public class BlockAmber extends Block {

protected BlockAmber (int i) {
super(i, Material.rock);

}
}


Thanks
1
04/10/2012 10:06 pm
Level 36 Artisan Dolphin
ike325
avatar
Did you make a BlockAmber class? If so could you post the code for it?

Search

Browse

Site

© planetminecraft.com

Welcome