Jump to content

[1.7.2] Custom pickaxe isn't returning stone when mined [SOLVED]


Budboy33

Recommended Posts

I made a custom pickaxe, and I don't want it to break, but it doesn't return stone when mined, can someone help please?

 

Pickaxe code:

 

package com.budboy.am.item;

 

import com.budboy.am.creativetab.CreativeTab;

 

import net.minecraft.item.ItemTool;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.EnumRarity;

import net.minecraft.item.Item;

import net.minecraft.item.ItemPickaxe;

import net.minecraft.item.ItemStack;

import net.minecraft.item.ItemTool;

 

public class ItemEmpoweredPickaxe extends Item {

 

public int getHarvestLevel (ItemStack stack, Block block, int meta){

return 3;

}

    @Override

    public float getDigSpeed (ItemStack stack, Block block, int meta)

    {

            return 20.0f;

    }

protected String getHarvestType ()

    {

        return "pickaxe";

    }

@Override

public boolean hasEffect(ItemStack par1ItemStack) {

return true;

}

@Override

@SideOnly(Side.CLIENT)

public EnumRarity getRarity(ItemStack par1ItemStack){

return EnumRarity.epic;

}

        public ItemEmpoweredPickaxe() {

                maxStackSize = 1;

                setCreativeTab(CreativeTab.magicTab);

                setUnlocalizedName("empoweredPickaxe");

                setTextureName("am:empoweredPickaxe");

        }

}

 

Sorry it's not in a spoiler, the spoiler button doesn't seem to work for me

Link to comment
Share on other sites

Should look like this:

	public Itemname(ToolMaterial material)
{
	super(material);
}

Then you can add this:

                setCreativeTab(CreativeTab.magicTab);
                setUnlocalizedName("empoweredPickaxe");
                setTextureName("am:empoweredPickaxe");

You won't need to set the stack size since its a pickaxe, they never stack..

If I helped then you help, hit that Thank You button or Applaud.

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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