Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9239373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:58:23+00:00 2026-06-18T07:58:23+00:00

Hello fellow programmers, today, I’ve been watching & reading Minecraft modding tutorials. It’s going

  • 0

Hello fellow programmers, today, I’ve been watching & reading Minecraft modding tutorials.
It’s going pretty good, except a weird bug in my code.

I’m creating “Emerald tools” which is basically a re-textured and OP:ed version of a regular tool.

So far, I’ve learned how to make the different tool sets (Sword, Pickaxe, Axe, Shovel, and Hoe), but whenever I want to craft the tools in-game, I get unexpected results. For an example, when I craft an axe, it becomes a pickaxe instead, to see what the hedge I’m talking about, please review my source-code and possibly, compile if you have the ModLoader & MCP available.

package net.minecraft.src;
import java.util.Random;

public class mod_minecraft extends BaseMod //Main modding file, extends BaseMod
{

public static final Item mew = new ItemMew(2085).setItemName("Mew"); //Mew, Item tutorial.
public static final Item EmeraldSword = new ItemSword(3077, EnumToolMaterial.MCM).setItemName("EmeraldSword"); //Emerald Sword, sword tutorial
public static final Item EmeraldPickaxe = new ItemPickaxe(2102, EnumToolMaterial.MCM).setItemName("EmeraldPickaxe"); //Emerald Pick
public static final Item EmeraldAxe = new ItemAxe(2096, EnumToolMaterial.MCM).setItemName("Emerald Axe");
public static final Item EmeraldShovel = new ItemSpade(2107, EnumToolMaterial.MCM).setItemName("Emerald Shovel");
public static final Item EmeraldHoe = new ItemHoe(2099, EnumToolMaterial.MCM).setItemName("Emerald Shovel");

public void load()
{

//Mew
mew.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/151Mew.png");
ModLoader.addName(mew, "Mew");
//

//Emerald Sword
EmeraldSword.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/greensword.png");
ModLoader.addName(EmeraldSword, "Emerald Sword");
ModLoader.addRecipe(new ItemStack(EmeraldSword, 1), new Object[]
{
" * ", " * ", " X ",
'X', Item.stick, '*', Item.emerald
});
//

///Emerald pickaxe
EmeraldPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/greenpick.png");
ModLoader.addName(EmeraldPickaxe, "Emerald Pickaxe");
ModLoader.addRecipe(new ItemStack(EmeraldPickaxe, 1), new Object[]
{
"***", " X ", " X ",
'X', Item.stick, '*', Item.emerald
});
//

//Emerald Axe
EmeraldAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/greenaxe.png");
ModLoader.addName(EmeraldAxe, "Emerald Axe");
ModLoader.addRecipe(new ItemStack(EmeraldPickaxe, 1), new Object[]
        {
    "** ", "*X ", " X ",
    'X', Item.stick, '*', Item.emerald
        });
//

//Emerald Shovel
EmeraldShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/greenshovel.png");
ModLoader.addName(EmeraldShovel, "Emerald Shovel");
ModLoader.addRecipe(new ItemStack(EmeraldShovel, 1), new Object []
{
    " * ", " X ", " X ",
    '*', Item.emerald, 'X', Item.stick
});
//

//Emerald Hoe
EmeraldHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/greenhoe.png");
ModLoader.addName(EmeraldHoe, "Emerald Hoe");
ModLoader.addRecipe(new ItemStack(EmeraldHoe, 1), new Object []
{
    "** ", " X ", " X ", 
    'X', Item.stick, '*', Item.emerald
});
//


}

public String getVersion()
{
return "3.14159265";
} 

In case you’re wondering, my first “test” item was a pixelated version of Mew (the legendary pokemon :D), for some reason, I still have it implemented in the code.

What is wrong? The only tool I can build properly is the sword, all other tools have different ways to be crafted/no ways.

If you don’t understand the source code below and you’re a decent programmer, don’t worry, this is Minecraft suff, which you obviously haven’t tried.

I’m using ModLoader and MCP (Minecraft Coder Pack.

In case you’re wondering, I’m able to compile the code, it’s just that the crafting table gives unexpected results.

All answers are appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:58:24+00:00Added an answer on June 18, 2026 at 7:58 am

    Right off of the bat, your axe crafting recipe is:


        ModLoader.addRecipe(new ItemStack(EmeraldPickaxe, 1), new Object[]
    {
    "** ", "X ", " X ",
    'X', Item.stick, '
    ', Item.emerald
    });

    Since you said Pickaxe, you are gonna have problems. My guess is that the Pickaxe and everything after it will be affected by that typo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello fellow programmers I have been searching the internet for a few days now
Hello fellow programmers! Recently, I started learning Git, and pretty quickly discovered the amazing
Hello fellow coders & codetts I was wondering, if I needed to create a
A good hello to you fellow Stackoverflow people. I am stuck with a small
Hello fellow programmers, as you might know from my previous questions I'm an absolute
Hello Again my fellow programmers out there, I'm designing and programming from scratch a
Hello fellow programmers. I have a SQL Server 2005 query that is taking a
hello fellow programmers, I followed a tutorial at http://www.androidsnippets.com/encrypt-decrypt-between-android-and-php to send a String encrypted
Hello fellow programmers, I've got a question regarding the realisation of an app which
Hello fellow programmers, I've made a rather complicated WPF application with data bound datagrids

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.