Class SerializedItemStackPlainNBT
java.lang.Object
sawfowl.localeapi.api.serializetools.itemstack.SerializedItemStackPlainNBT
- 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
ConstructorsConstructorDescriptionSerializedItemStackPlainNBT(String type, int quantity, String nbt) SerializedItemStackPlainNBT(ItemStack itemStack) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsToItemStack(ItemStack itemStack) booleanequalsWhithoutNBT(SerializedItemStackPlainNBT itemStack) booleannet.kyori.adventure.key.KeyThe resulting value can be used to display the item in chat.GettingItemStackGettingItemTypegetNBT()Get all tags as a string.Gaining access to the NBT tags of an item.GettingItemStackvolume.inthashCode()voidsetQuantity(int quantity) ChangingItemStackvolume.com.google.gson.JsonObjectConvert class objects to json data array.
It is recommended not to do `return null`.toString()
-
Constructor Details
-
SerializedItemStackPlainNBT
-
SerializedItemStackPlainNBT
-
SerializedItemStackPlainNBT
-
SerializedItemStackPlainNBT
-
-
Method Details
-
getItemTypeAsString
-
getQuantity
GettingItemStackvolume. -
getNBT
Get all tags as a string. -
getItemStack
GettingItemStack -
getItemType
GettingItemType -
getItemKey
public net.kyori.adventure.key.Key getItemKey()The resulting value can be used to display the item in chat. -
getOrCreateTag
Gaining access to the NBT tags of an item. -
setQuantity
public void setQuantity(int quantity) ChangingItemStackvolume. -
toSerializedItemStackJsonNbt
-
hashCode
public int hashCode() -
equals
-
equalsWhithoutQuantity
-
equalsWhithoutNBT
-
equalsToItemStack
-
toString
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()Description copied from interface:CompoundTagConvert class objects to json data array.
It is recommended not to do `return null`.- Specified by:
toJsonObjectin interfaceCompoundTag
-