Jump to content

[1.8] Pickaxe Help [SOLVED?]


CritiqualError

Recommended Posts

Problem Solved?Instead of typing it out, I let it autofill and that corrected the issue? idk. its working now though. I have no idea what happened.

 

 

Something little this time... and its confusing me and I'm probably just missing something little.

 

pickaxe_example = new ItemPickaxe(ExampleMaterial).setUnlocalizedName("pickaxe_example").setCreativeTab(example.exampletab);

 

The error im getting is about the "new ItemPickaxe..." and I'm not sure what's wrong with it. It's underlined with an error and it gives no suggestions. {ItemPickaxe is imported as well}

I have these setup beforehand too

 

public static ToolMaterial ExampleMaterial = EnumHelper.addToolMaterial("ExampleMaterial", 0, 99, 1.0f, 1.0f, 0);

public static Item pickaxe_example ;

Link to comment
Share on other sites

would you mind to tell us the error? We are not the best at guessing ;)

 

The error im getting is about the "new ItemPickaxe..." and I'm not sure what's wrong with it. It's underlined with an error and it gives no suggestions.

I said the problem already. I'm not sure whats wrong with it. It just says "ItemPickaxe" is wrong and gives no suggestions. its imported, the pickaxe_example is setup, the ExampleMaterial is setup. idk whats wrong passed that.

Link to comment
Share on other sites

Sometimes Eclipse can get confused, and the cause might be in editor metadata, not your code itself. Try doing a project "clean". It's likely that Eclipse hadn't yet recognized that your ExampleMaterial fit the calling profile of the ItemPickaxe constructor. Kicking Eclipse a few times can sort it out.

 

When that doesn't work, then it's time to look closely at elements like ExampleMaterial to confirm that they are what you think they are.

 

 

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

If you hover over the red squiggly line it will tell you the problem.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Often in such cases the "problem" is the very vague "syntax error". That's when one must kick Eclipse until it sees changed source elsewhere. Clean does a good job of that (at least in the Java version of Eclipse).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.