Jump to content

Bug report? custom Axe prob forge


Recommended Posts

Here is my problem am made a custom axe tool and when I entered in game the axe doesn't act like one or he is not recognize as a axe

if the problem come from me am sorry.


but in case,here is my code



package jejeliteSimplelogic;


import javax.tools.Tool;


import net.minecraft.block.Block;

import net.minecraft.block.BlockWood;

import net.minecraft.block.material.MapColor;

import net.minecraft.block.material.Material;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.SidedProxy;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemAxe;

import net.minecraft.item.ItemStack;

import net.minecraftforge.common.EnumHelper;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import jejeliteSimplelogic.ToolWoodAxe;

import net.minecraft.item.EnumToolMaterial;


@Mod(modid="SimpleLogicMod", name="Simple Logic", version="0.1")

@NetworkMod(clientSideRequired=true, serverSideRequired=false)


public class SimpleLogicMod {


//Instance of the mod

public static SimpleLogicMod instance;


//Initialisation des outils


public static Item WoodHachet;


// Initialisation de la hachet


public static EnumToolMaterial CHIP = EnumHelper.addToolMaterial("CHIP", 0, 26, 2.0F, 0F, 4);




    public void preInit (FMLPreInitializationEvent event) {

        // Stub Method




    WoodHachet = new ToolWoodAxe (255,CHIP).setUnlocalizedName("simplelogic:hachet");


    //enregistrement de la hachet

      GameRegistry.registerItem(WoodHachet, "Hachet");

      LanguageRegistry.addName(WoodHachet, "Hachet");


      //  objets et blocks

      ItemStack StickStack  = new ItemStack(Item.stick);

      ItemStack planksStack = new ItemStack(Block.planks); 


    // recette   

        // recette pour "planks"

        GameRegistry.addRecipe(new ItemStack(Block.planks), "s", "s",

                's', StickStack);

        // recette pour "hachet"

        GameRegistry.addRecipe(new ItemStack(WoodHachet), "ps", " s",

                's', StickStack, 'p', planksStack);





public void load (FMLInitializationEvent event) {





public void postInit (FMLPostInitializationEvent event) {

    // Stub Method







and the ToolAxeWood class



package jejeliteSimplelogic;


import com.jcraft.jorbis.Block;

import net.minecraft.block.*;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.ItemAxe;


public class ToolWoodAxe extends ItemAxe



    public ToolWoodAxe(int par1, EnumToolMaterial par2EnumToolMaterial) {

super(par1, par2EnumToolMaterial);



public void registerIcons(IconRegister iconRegister) {

itemIcon = iconRegister.registerIcon("simplelogic:hachet");






note I change the wood and dirt material to requiretool(set.requiretool)



Link to comment
Share on other sites

Not sure about 1.6, but in 1.5 you have to register your tool with MinecraftForge.setToolClass.


PS: You can directly pass "ingredient" items to the recipe method (if you don't want to setup damage or NBT) - GameRegistry.addRecipe(new ItemStack(Block.planks), "s", "s", 's', Item.stick);

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.