1
HELP CODING ERROR ENUMHELPER.addToolMaterial
Here is my problem....!
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.registry.GameRegistry;
import MoreBlocksMod.block.SuperBlock;
import MoreBlocksMod.item.SuperPickaxe;
@Mod(modid = "MoreBlocksMod", name = "MoreBlocksMod", version = "ALPHA 1.0")
public class MoreBlocksMod {
@SidedProxy(clientSide = "MoreBlocksMod.common.ClientProxy", serverSide = "MoreBlocksMod.common.CommonProxy")
public static CommonProxy proxy;
public static ToolMaterial RedStone = EnumHelper.addToolMaterial("REDSTONE", 4, 3000, 4.0f, 2, 25);
public static Block SuperBlock = new SuperBlock(3000, Material.rock).setBlockName("SuperBlock").setBlockTextureName("MoreBlocksMod:SuperBlock");
public static Item SuperPickaxe = new SuperPickaxe(3001, RedStone).setUnlocalizedName("SuperPickaxe").setTextureName("MoreBlocksMod:SuperPickaxe");
public MoreBlocksMod() {
GameRegistry.registerBlock(SuperBlock, "SuperBlock");
GameRegistry.registerItem(SuperPickaxe, "SuperPickaxe");
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.registry.GameRegistry;
import MoreBlocksMod.block.SuperBlock;
import MoreBlocksMod.item.SuperPickaxe;
@Mod(modid = "MoreBlocksMod", name = "MoreBlocksMod", version = "ALPHA 1.0")
public class MoreBlocksMod {
@SidedProxy(clientSide = "MoreBlocksMod.common.ClientProxy", serverSide = "MoreBlocksMod.common.CommonProxy")
public static CommonProxy proxy;
public static ToolMaterial RedStone = EnumHelper.addToolMaterial("REDSTONE", 4, 3000, 4.0f, 2, 25);
public static Block SuperBlock = new SuperBlock(3000, Material.rock).setBlockName("SuperBlock").setBlockTextureName("MoreBlocksMod:SuperBlock");
public static Item SuperPickaxe = new SuperPickaxe(3001, RedStone).setUnlocalizedName("SuperPickaxe").setTextureName("MoreBlocksMod:SuperPickaxe");
public MoreBlocksMod() {
GameRegistry.registerBlock(SuperBlock, "SuperBlock");
GameRegistry.registerItem(SuperPickaxe, "SuperPickaxe");
Create an account or sign in to comment.
2
Unrelated to your error, but: http://www.oracle.com/technetwork/java/ ... 9.html#367
I think the "2" needs to be 2F. I don't have the code infront of me right now, but check if there is a float needed. I know it needs a name, a mining lvl, max uses, but i'm unsure about the rest. If it days (float) there needs to be an F at the end of the number, if it says int, it's just the number. If it says boolean, its true or false. Any other problems, i'd be glad to help tomorrow