Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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.

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.

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...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.