Posted June 1, 201411 yr 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) https://gist.github.com/EliteForges/11e8415aa67f002ccdf1 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.
June 1, 201411 yr 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.
June 1, 201411 yr Author The Onyx Tools are not enchantabl;e even thought the enchantability is at 22, however. Here is the console output upon starting up: https://gist.github.com/EliteForges/7ee88b508623e92927f9
June 1, 201411 yr 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.
June 1, 201411 yr Author Oh ok, So how would I go about making it an "infinite uses" tool while keeping enchantability?
June 1, 201411 yr Raise the amount of max uses. Can set to 1million dont know about infinite but it will break after 1million uses.
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.