Jump to content

MultiTool Problems. [SOLVED]


SapFireMC

Recommended Posts

So now that i learned about items, i wanted to make a multitool. Alright so i did everything until i got to the class multitool. I figured that all the tools except shears and sword comes from one superclass called ItemTools. So i extended that and make a constructor, but then in my Modded items class, i got an error at

multishard = new MultiShard(MultiShard)

. The error says that the constructor for my multishard class is unidentified. Please help!

Heres my ModItem class: http://pastebin.com/h3gaMezq

Heres my MultiShard class: http://pastebin.com/P8r8Av1G

 

Thanks!

~Sap

Link to comment
Share on other sites

In your MultiTool class your constructor takes three parameters:

 

protected MultiShard(float p_i45333_1_, ToolMaterial p_i45333_2_, Set p_i45333_3_)

 

When you register it, you only add one:

 

multishard = new MultiShard(MultiShard).setUnlocalizedName("multishard").setCreativeTab(MCreativeTabs.tabTools).setTextureName(RefStrings.MODID + ":MultiTool");

 

You need every parameter in order for it to run.

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Link to comment
Share on other sites

Just look up a tutorial on how to make tools. When you are defining the multitool in your Main mod class, you only pass one parameter when it requires three. You could look through the ItemTool class to see how they use the float, and Set parameter you're missing.

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Link to comment
Share on other sites

I'll also point out that that one parameter you're passing is the variable you're using to hold the tool item, which at that point, it is null.

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

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.