Class ItemMappings

java.lang.Object
org.geysermc.geyser.registry.type.ItemMappings

public final class ItemMappings extends Object
  • Method Details

    • getMapping

      @Nonnull public ItemMapping getMapping(com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack itemStack)
      Gets an ItemMapping from the given ItemStack.
      Parameters:
      itemStack - the itemstack
      Returns:
      an item entry from the given java edition identifier
    • getMapping

      @Nonnull public ItemMapping getMapping(int javaId)
      Gets an ItemMapping from the given Minecraft: Java Edition id.
      Parameters:
      javaId - the id
      Returns:
      an item entry from the given java edition identifier
    • getMapping

      public ItemMapping getMapping(String javaIdentifier)
      Gets an ItemMapping from the given Minecraft: Java Edition block state identifier.
      Parameters:
      javaIdentifier - the block state identifier
      Returns:
      an item entry from the given java edition identifier
    • getMapping

      public ItemMapping getMapping(com.nukkitx.protocol.bedrock.data.inventory.ItemData data)
      Gets an ItemMapping from the given ItemData.
      Parameters:
      data - the item data
      Returns:
      an item entry from the given item data
    • builder

      public static ItemMappings.ItemMappingsBuilder builder()
    • getCachedJavaMappings

      public Map<String,​ItemMapping> getCachedJavaMappings()
    • getItems

      public ItemMapping[] getItems()
    • getLodestoneCompass

      public ItemMapping getLodestoneCompass()
      A unique exception as this is an item in Bedrock, but not in Java.
    • getCreativeItems

      public com.nukkitx.protocol.bedrock.data.inventory.ItemData[] getCreativeItems()
    • getItemEntries

      public List<com.nukkitx.protocol.bedrock.packet.StartGamePacket.ItemEntry> getItemEntries()
    • getStoredItems

      public StoredItemMappings getStoredItems()
    • getItemNames

      public String[] getItemNames()
    • getJavaOnlyItems

      public Set<String> getJavaOnlyItems()
    • getBucketIds

      public it.unimi.dsi.fastutil.ints.IntList getBucketIds()
    • getBoatIds

      public it.unimi.dsi.fastutil.ints.IntList getBoatIds()
    • getSpawnEggIds

      public it.unimi.dsi.fastutil.ints.IntList getSpawnEggIds()
    • getCarpets

      public List<com.nukkitx.protocol.bedrock.data.inventory.ItemData> getCarpets()
    • getComponentItemData

      public List<com.nukkitx.protocol.bedrock.data.inventory.ComponentItemData> getComponentItemData()
    • getCustomIdMappings

      public it.unimi.dsi.fastutil.ints.Int2ObjectMap<String> getCustomIdMappings()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object