Package net.minecraft.core.component
Class PatchedDataComponentMap
java.lang.Object
net.minecraft.core.component.PatchedDataComponentMap
- All Implemented Interfaces:
Iterable<TypedDataComponent<?>>,DataComponentMap
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.core.component.DataComponentMap
DataComponentMap.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> private final DataComponentMapFields inherited from interface net.minecraft.core.component.DataComponentMap
CODEC, EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionPatchedDataComponentMap(DataComponentMap p_331141_) privatePatchedDataComponentMap(DataComponentMap p_335089_, it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> p_333211_, boolean p_334948_) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyPatch(DataComponentPatch p_329626_) private voidapplyPatch(DataComponentType<?> p_327856_, Optional<?> p_331456_) asPatch()copy()private voidbooleanstatic PatchedDataComponentMapfromPatch(DataComponentMap p_334311_, DataComponentPatch p_332061_) <T> Tget(DataComponentType<? extends T> p_331525_) inthashCode()private static booleanisPatchSanitized(DataComponentMap p_331971_, it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> p_332857_) iterator()Set<DataComponentType<?>> keySet()<T> Tremove(DataComponentType<? extends T> p_331496_) voidrestorePatch(DataComponentPatch p_331119_) <T> Tset(DataComponentType<? super T> p_334181_, T p_328828_) voidsetAll(DataComponentMap p_336067_) intsize()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.core.component.DataComponentMap
filter, getOrDefault, getTyped, has, isEmpty, streamMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
prototype
-
patch
-
copyOnWrite
private boolean copyOnWrite
-
-
Constructor Details
-
PatchedDataComponentMap
-
PatchedDataComponentMap
private PatchedDataComponentMap(DataComponentMap p_335089_, it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> p_333211_, boolean p_334948_)
-
-
Method Details
-
fromPatch
public static PatchedDataComponentMap fromPatch(DataComponentMap p_334311_, DataComponentPatch p_332061_) -
isPatchSanitized
private static boolean isPatchSanitized(DataComponentMap p_331971_, it.unimi.dsi.fastutil.objects.Reference2ObjectMap<DataComponentType<?>, Optional<?>> p_332857_) -
get
- Specified by:
getin interfaceDataComponentMap
-
set
-
remove
-
applyPatch
-
applyPatch
-
restorePatch
-
setAll
-
ensureMapOwnership
private void ensureMapOwnership() -
keySet
- Specified by:
keySetin interfaceDataComponentMap
-
iterator
- Specified by:
iteratorin interfaceDataComponentMap- Specified by:
iteratorin interfaceIterable<TypedDataComponent<?>>
-
size
public int size()- Specified by:
sizein interfaceDataComponentMap
-
asPatch
-
copy
-
equals
-
hashCode
public int hashCode() -
toString
-