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,

I am trying to create a set of custom armor that has a value that is unique to each chestplate. I know that in order to do this, I need to assign an NBT tag to the armor. However, I am not quite sure how to do this. I essentially need this value to be stored like durability. If anyone could help me out here I would appreciate it.

47 minutes ago, skip999 said:

Hello,

I am trying to create a set of custom armor that has a value that is unique to each chestplate. I know that in order to do this, I need to assign an NBT tag to the armor. However, I am not quite sure how to do this. I essentially need this value to be stored like durability. If anyone could help me out here I would appreciate it.

no nbt, you need an IArmorMaterial, look at the vanilla ArmorMaterial enum, also take a look at the ArmorItem

  • Author

I can see the confusion here. What I am essentially trying to add is a "ceramic plate" system to the armor. When the player takes a certain amount of damage, a plate is used to reduce it. I need the armor piece to be able to "store" these plates as a value. However, this value would be unique to each piece of armor. I tried using the class constant method you mentioned, but doing that has the value appear across all pieces of that armor. I know NBT is the way to do this, but I don't know how to implement it.

use this with an ItemStack Capability

40 minutes ago, Luis_ST said:

no nbt, you need an IArmorMaterial, look at the vanilla ArmorMaterial enum, also take a look at the ArmorItem

  • Author

Okay so I have created the Capability. My question is now how to attach it to an item when a new item is created. Would I use the ItemEvent?

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.