Class DataComponentPatch
java.lang.Object
net.minecraft.core.component.DataComponentPatch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static interfaceprivate static final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DataComponentPatch> static final StreamCodec<RegistryFriendlyByteBuf, DataComponentPatch> static final DataComponentPatch(package private) final it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> private static final Stringstatic final StreamCodec<RegistryFriendlyByteBuf, DataComponentPatch> -
Constructor Summary
ConstructorsConstructorDescriptionDataComponentPatch(it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> map) -
Method Summary
Modifier and TypeMethodDescriptionstatic DataComponentPatch.Builderbuilder()private static StreamCodec<RegistryFriendlyByteBuf, DataComponentPatch> createStreamCodec(DataComponentPatch.CodecGetter codecGetter) Set<Map.Entry<DataComponentType<?>, Optional<?>>> entrySet()booleanforget(Predicate<DataComponentType<?>> test) <T> @Nullable Tget(DataComponentGetter prototype, DataComponentType<? extends T> type) (package private) static <T> @Nullable TgetFromPatchAndPrototype(it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> patch, DataComponentGetter prototype, DataComponentType<? extends T> type) <T> @Nullable Optional<T> getPatch(DataComponentType<? extends T> type) Returns the patch stored for the given component type, null if no patch is stored.inthashCode()booleanisEmpty()intsize()split()toString()(package private) static StringtoString(it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> map)
-
Field Details
-
EMPTY
-
CODEC
-
STREAM_CODEC
-
DELIMITED_STREAM_CODEC
-
REMOVED_PREFIX
- See Also:
-
map
-
-
Constructor Details
-
DataComponentPatch
DataComponentPatch(it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> map)
-
-
Method Details
-
createStreamCodec
private static StreamCodec<RegistryFriendlyByteBuf, DataComponentPatch> createStreamCodec(DataComponentPatch.CodecGetter codecGetter) -
builder
-
getPatch
Returns the patch stored for the given component type, null if no patch is stored.- Returns:
- the patch stored for the given component type, null if no patch is stored
-
get
-
getFromPatchAndPrototype
static <T> @Nullable T getFromPatchAndPrototype(it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> patch, DataComponentGetter prototype, DataComponentType<? extends T> type) -
entrySet
-
size
public int size() -
forget
-
isEmpty
public boolean isEmpty() -
split
-
equals
-
hashCode
-
toString
-
toString
static String toString(it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> map)
-