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 Summary
Modifier and TypeMethodDescription<T> Tget(ItemDataComponent<T> type) default <T> TgetOrDefault(ItemDataComponent<T> type, T fallback) Set<ItemDataComponent<?>> keySet()
-
Method Details
-
get
- Returns:
- the value of the given component, or null if it is not in the map
- Since:
- 2.9.3
-
getOrDefault
- Returns:
- the value of the given component, or
fallbackif it is null - Since:
- 2.9.3
-
keySet
Set<ItemDataComponent<?>> keySet()- Returns:
- all data components in this map
- Since:
- 2.9.3
-