Package net.minecraft.core.component
Interface DataComponentMap
- All Superinterfaces:
Iterable<TypedDataComponent<?>>
- All Known Implementing Classes:
DataComponentMap.Builder.SimpleMap
,PatchedDataComponentMap
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<DataComponentMap> static final DataComponentMap
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataComponentMap.Builder
builder()
static DataComponentMap
composite
(DataComponentMap p_340974_, DataComponentMap p_341350_) default DataComponentMap
filter
(Predicate<DataComponentType<?>> p_331448_) <T> T
get
(DataComponentType<? extends T> p_331815_) default <T> T
getOrDefault
(DataComponentType<? extends T> p_331896_, T p_331597_) default <T> TypedDataComponent
<T> getTyped
(DataComponentType<T> p_330594_) default boolean
has
(DataComponentType<?> p_330409_) default boolean
isEmpty()
default Iterator
<TypedDataComponent<?>> iterator()
Set
<DataComponentType<?>> keySet()
static com.mojang.serialization.Codec
<DataComponentMap> makeCodec
(com.mojang.serialization.Codec<DataComponentType<?>> p_345883_) static com.mojang.serialization.Codec
<DataComponentMap> makeCodecFromMap
(com.mojang.serialization.Codec<Map<DataComponentType<?>, Object>> p_346302_) default int
size()
default Stream
<TypedDataComponent<?>> stream()
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY
-
CODEC
-
-
Method Details
-
makeCodec
static com.mojang.serialization.Codec<DataComponentMap> makeCodec(com.mojang.serialization.Codec<DataComponentType<?>> p_345883_) -
makeCodecFromMap
static com.mojang.serialization.Codec<DataComponentMap> makeCodecFromMap(com.mojang.serialization.Codec<Map<DataComponentType<?>, Object>> p_346302_) -
composite
-
builder
-
get
-
keySet
Set<DataComponentType<?>> keySet() -
has
-
getOrDefault
-
getTyped
-
iterator
- Specified by:
iterator
in interfaceIterable<TypedDataComponent<?>>
-
stream
-
size
default int size() -
isEmpty
default boolean isEmpty() -
filter
-