As seen in the CrossbowItem class, an NBT boolean tag “Charged” is attached to crossbows. I have a custom item that extends CrossbowItem, and I want to attach other data in addition to the “Charged” tag.
Should I use capabilities or NBTs? I am wondering if there are any significant advantages of using one over another for ItemStacks.
Nice question
you can use directly nbt or create a capability
whats the deal
NBT is data stored inside an internal database every time you recall data it has to create an NBT object and query the internal database to read or write data
Capability is a java object loaded in memory it recall data from the item internally uses NBT but only query save/write data when changes are detected, capabilities keep loaded in memory until the item is stored or discarted
if you just