Class SerializedItemStackJsonNbt
java.lang.Object
sawfowl.localeapi.api.serializetools.itemstack.SerializedItemStackJsonNbt
- All Implemented Interfaces:
CompoundTag
The class is intended for working with item data when it is necessary to access it before registering item data in the registry.
-
Constructor Summary
ConstructorsConstructorDescriptionSerializedItemStackJsonNbt
(String type, int quantity, com.google.gson.JsonObject nbt) SerializedItemStackJsonNbt
(ItemStack itemStack) -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.key.Key
The resulting value can be used to display the item in chat.GettingItemStack
GettingItemType
com.google.gson.JsonObject
getNBT()
The method returns a copy of the item's NBT tag collection in Json format.Gaining access to the NBT tags of an item.void
setQuantity
(int quantity) ChangingItemStack
volume.com.google.gson.JsonObject
Convert class objects to json data array.
It is recommended not to do `return null`.toString()
-
Constructor Details
-
SerializedItemStackJsonNbt
-
SerializedItemStackJsonNbt
-
SerializedItemStackJsonNbt
-
SerializedItemStackJsonNbt
-
-
Method Details
-
getItemStack
GettingItemStack
-
getItemType
GettingItemType
-
getItemTypeAsString
-
getNBT
public com.google.gson.JsonObject getNBT()The method returns a copy of the item's NBT tag collection in Json format. -
getQuantity
-
getItemKey
public net.kyori.adventure.key.Key getItemKey()The resulting value can be used to display the item in chat. -
setQuantity
public void setQuantity(int quantity) ChangingItemStack
volume. -
getOrCreateTag
Gaining access to the NBT tags of an item. -
toSerializedItemStackPlainNBT
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()Description copied from interface:CompoundTag
Convert class objects to json data array.
It is recommended not to do `return null`.- Specified by:
toJsonObject
in interfaceCompoundTag
-
toString
-