Jump to content

Help with NBT


skip999

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

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.

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

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