Interface AbstractItemNbt
- All Known Subinterfaces:
AbstractItemTextPre_1_17
show_item hover is built from.
Adventure holds an item hover as an id, a count and a tag compound, and reassembles the
wire form from those three. Servers from 1.18.2 onward hand that over through their own
ItemStack.asHoverEvent(); below it, the values have to be read from NMS, which is what
this interface is for.
Implemented for every server version below 1.18.2. From 1.8 to 1.16.5 the implementation is the
one AbstractItemTextPre_1_17 already
carried, which is why that interface extends this one; 1.17 and 1.18.1 have their own.
-
Method Summary
-
Method Details
-
getItemId
-
getNbtTag
The item'stagcompound as an SNBT string, ornullwhen it has none.This is the inner compound holding the display name, lore and enchantments. It is not the whole item NBT, which also carries
id,Countand, below 1.13,Damage. Handing the whole item over instead nests it under a secondtagkey and produces a hover that renders as the plain item with no name and no lore.- Parameters:
item- theItemStackto read- Returns:
- the
tagcompound as SNBT, ornullwhen the item carries no tag
-