Jump to content

[1.6.4] Tools are not enchantable (Please help!)


Recommended Posts

So I've been getting frustrated lately because I have a mod that is growing very fast and it has 1 major problem: None of my tools are enchantable. I tried adding the tools to the ore dictionary to see if making it register as a vanilla pickaxe would help only to find out that tools don't use the ore dictionary, so then I tried copying and pasting my own version of EnumToolMaterial which also didn't work after I referenced and changed around everything correctly, and now I'm stuck without a working solution to any of my problems.


Here is the code:    (If you need more just let me know)




I really need tools I make myself to be enchantable. I would also appreciate it if you could tell me how to make it so that when I use axes to cut down trees, TreeCapacitor recognizes it as an axe tool.

Link to comment
Share on other sites

Do you get any error in console .Please post it .


And this is the method to add a material

EnumHelper.addToolMaterial(String name, int harvestLevel, int maxUses, float efficiency, float damage, int enchantability);


You have done it right in your code but if the last integer in stater which is of enchantability is set to 0 it cant be enchanted.

Link to comment
Share on other sites

Try to change the -1 in maxuses


public static EnumToolMaterial onyxEnum = EnumHelper.addToolMaterial("onyxEnum", 3 ,  -1  , 6.0F, 3.0F, 22);  //-1 here


Give it a positive number and then try.


Edit: I was right, I tried it. Give the maxuses a positive number

Because the maxuses is the amount of time it can be used.

So it cant be negetive.

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.