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

Hello all,

I recently just tried out my two mod items in survival mode, only finding that they have extremely low durability. My sword can only hit something twice before breaking and my pickaxe can only mine 10 or so blocks-- not what I want. The script I am using to add durability and etc. is as follows:

(I currently have max durability here because I wanted to see if that would fix it)

 

@EventHandler

    public void Preinit(FMLPreInitializationEvent event){

    //added things

 

//zodiac items

zodiac_shard = new ZShard();

ToolMaterial ZODIACS = EnumHelper.addToolMaterial("ZODIACS", 3, 100000000, 15.0F, 6.0F, 30);

ToolMaterial ZODIACP = EnumHelper.addToolMaterial("ZODIACP", 6, 100000000, 20.0F, 7.0F, 25);

capricorn_sword = new CapricornSword(ZODIACS);

pisces_pickaxe = new PiscesPickaxe(ZODIACP);

 

I would appreciate anyone's help and thanks for at least reading this far.

Sincerely,

BinauralPath

  • Author

If you are using the default damage handling the maximum durability you can use is 32766. If you want more you need to handle it yourself using NBT data.

 

Can you phrase that a bit more simply? I didn't really understand it.

He means that you should use a NBTTagCompound to store the durability of the item. Google it, it's a simple thing that is used by a lot of mods.

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.