Interface ItemDataComponentMap


public interface ItemDataComponentMap
A map of data components to their values. Mainly used internally when mapping custom items.
Since:
2.9.3
  • Method Details

    • get

      <T> T get(ItemDataComponent<T> type)
      Returns:
      the value of the given component, or null if it is not in the map
      Since:
      2.9.3
    • getOrDefault

      default <T> T getOrDefault(ItemDataComponent<T> type, T fallback)
      Returns:
      the value of the given component, or fallback if it is null
      Since:
      2.9.3
    • keySet

      Set<ItemDataComponent<?>> keySet()
      Returns:
      all data components in this map
      Since:
      2.9.3