Class ItemUtils

java.lang.Object
org.cloudburstmc.server.item.ItemUtils

public class ItemUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.cloudburstmc.api.item.ItemStack
    createBlockItem​(org.cloudburstmc.api.block.BlockType block, int amount, Object... metadata)
     
    static org.cloudburstmc.api.item.ItemStack
    deserializeItem​(com.nukkitx.nbt.NbtMap tag)
     
    deserializeItem​(org.cloudburstmc.api.util.Identifier id, short damage, int amount, com.nukkitx.nbt.NbtMap tag)
     
    static org.cloudburstmc.api.item.ItemStack
    fromJson​(Map<String,​Object> data)
     
    static org.cloudburstmc.api.item.ItemStack
    fromNetwork​(com.nukkitx.protocol.bedrock.data.inventory.ItemData data)
     
    static int
     
    static UUID
    getMultiItemHash​(List<org.cloudburstmc.api.item.ItemStack> items)
     
    static boolean
    isNull​(org.cloudburstmc.api.item.ItemStack item)
     
    static com.nukkitx.nbt.NbtMap
    serializeItem​(org.cloudburstmc.api.item.ItemStack item)
     
    static com.nukkitx.nbt.NbtMap
    serializeItem​(org.cloudburstmc.api.item.ItemStack item, int slot)
     
    static List<com.nukkitx.protocol.bedrock.data.inventory.ItemData>
    toNetwork​(Collection<org.cloudburstmc.api.item.ItemStack> items)
     
    static com.nukkitx.protocol.bedrock.data.inventory.ItemData
    toNetwork​(org.cloudburstmc.api.item.ItemStack item)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ItemUtils

      public ItemUtils()
  • Method Details

    • serializeItem

      public static com.nukkitx.nbt.NbtMap serializeItem(org.cloudburstmc.api.item.ItemStack item)
    • serializeItem

      public static com.nukkitx.nbt.NbtMap serializeItem(org.cloudburstmc.api.item.ItemStack item, int slot)
    • deserializeItem

      public static org.cloudburstmc.api.item.ItemStack deserializeItem(com.nukkitx.nbt.NbtMap tag)
    • deserializeItem

      public static CloudItemStack deserializeItem(org.cloudburstmc.api.util.Identifier id, short damage, int amount, com.nukkitx.nbt.NbtMap tag)
    • toNetwork

      public static List<com.nukkitx.protocol.bedrock.data.inventory.ItemData> toNetwork(Collection<org.cloudburstmc.api.item.ItemStack> items)
    • toNetwork

      public static com.nukkitx.protocol.bedrock.data.inventory.ItemData toNetwork(org.cloudburstmc.api.item.ItemStack item)
    • fromNetwork

      public static org.cloudburstmc.api.item.ItemStack fromNetwork(com.nukkitx.protocol.bedrock.data.inventory.ItemData data)
    • isNull

      public static boolean isNull(org.cloudburstmc.api.item.ItemStack item)
    • fromJson

      public static org.cloudburstmc.api.item.ItemStack fromJson(Map<String,​Object> data)
    • getItemHash

      public static int getItemHash(CloudItemStack item)
    • getMultiItemHash

      public static UUID getMultiItemHash(List<org.cloudburstmc.api.item.ItemStack> items)
    • createBlockItem

      public static org.cloudburstmc.api.item.ItemStack createBlockItem(org.cloudburstmc.api.block.BlockType block, int amount, Object... metadata)