Interface ViaItem
public interface ViaItem
A dialog item serializable to its item tag for the target version of the dialog.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ViaItemfromItem(com.viaversion.viaversion.api.minecraft.item.Item item) Wrap a ViaVersionItemas a dialog itemcom.viaversion.nbt.tag.CompoundTagtoTag(com.viaversion.viaversion.util.SerializerVersion baseVersion, com.viaversion.viaversion.util.SerializerVersion targetVersion) Serialize this item to its item tag for the given base and target serializers
-
Method Details
-
fromItem
Wrap a ViaVersionItemas a dialog item- Parameters:
item- the item to wrap- Returns:
- the dialog item
-
toTag
com.viaversion.nbt.tag.CompoundTag toTag(com.viaversion.viaversion.util.SerializerVersion baseVersion, com.viaversion.viaversion.util.SerializerVersion targetVersion) Serialize this item to its item tag for the given base and target serializers- Parameters:
baseVersion- the serializer of the server version the dialog is created fortargetVersion- the serializer of the version the dialog is sent to- Returns:
- the item tag
-