Class MergedComponentMap

java.lang.Object
net.minecraft.component.MergedComponentMap
All Implemented Interfaces:
Iterable<Component<?>>, ComponentMap

public final class MergedComponentMap extends Object implements ComponentMap
A Map that has a base map and changes to be applied on top of it.
Mappings:
Namespace Name
named net/minecraft/component/MergedComponentMap
intermediary net/minecraft/class_9335
official kv
  • Field Details

    • baseComponents

      private final ComponentMap baseComponents
      Mappings:
      Namespace Name Mixin selector
      named baseComponents Lnet/minecraft/component/MergedComponentMap;baseComponents:Lnet/minecraft/component/ComponentMap;
      intermediary field_49654 Lnet/minecraft/class_9335;field_49654:Lnet/minecraft/class_9323;
      official c Lkv;c:Lkq;
    • changedComponents

      private Reference2ObjectMap<ComponentType<?>,Optional<?>> changedComponents
      Mappings:
      Namespace Name Mixin selector
      named changedComponents Lnet/minecraft/component/MergedComponentMap;changedComponents:Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;
      intermediary field_49655 Lnet/minecraft/class_9335;field_49655:Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;
      official d Lkv;d:Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;
    • copyOnWrite

      private boolean copyOnWrite
      Mappings:
      Namespace Name Mixin selector
      named copyOnWrite Lnet/minecraft/component/MergedComponentMap;copyOnWrite:Z
      intermediary field_49656 Lnet/minecraft/class_9335;field_49656:Z
      official e Lkv;e:Z
  • Constructor Details

    • MergedComponentMap

      public MergedComponentMap(ComponentMap baseComponents)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/component/MergedComponentMap;<init>(Lnet/minecraft/component/ComponentMap;)V
      intermediary <init> Lnet/minecraft/class_9335;<init>(Lnet/minecraft/class_9323;)V
      official <init> Lkv;<init>(Lkq;)V
    • MergedComponentMap

      private MergedComponentMap(ComponentMap baseComponents, Reference2ObjectMap<ComponentType<?>,Optional<?>> changedComponents, boolean copyOnWrite)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/component/MergedComponentMap;<init>(Lnet/minecraft/component/ComponentMap;Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;Z)V
      intermediary <init> Lnet/minecraft/class_9335;<init>(Lnet/minecraft/class_9323;Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;Z)V
      official <init> Lkv;<init>(Lkq;Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;Z)V
  • Method Details

    • create

      public static MergedComponentMap create(ComponentMap baseComponents, ComponentChanges changes)
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/component/MergedComponentMap;create(Lnet/minecraft/component/ComponentMap;Lnet/minecraft/component/ComponentChanges;)Lnet/minecraft/component/MergedComponentMap;
      intermediary method_57935 Lnet/minecraft/class_9335;method_57935(Lnet/minecraft/class_9323;Lnet/minecraft/class_9326;)Lnet/minecraft/class_9335;
      official a Lkv;a(Lkq;Lkr;)Lkv;
    • shouldReuseChangesMap

      private static boolean shouldReuseChangesMap(ComponentMap baseComponents, Reference2ObjectMap<ComponentType<?>,Optional<?>> changedComponents)
      Mappings:
      Namespace Name Mixin selector
      named shouldReuseChangesMap Lnet/minecraft/component/MergedComponentMap;shouldReuseChangesMap(Lnet/minecraft/component/ComponentMap;Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;)Z
      intermediary method_57934 Lnet/minecraft/class_9335;method_57934(Lnet/minecraft/class_9323;Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;)Z
      official a Lkv;a(Lkq;Lit/unimi/dsi/fastutil/objects/Reference2ObjectMap;)Z
    • get

      @Nullable public <T> T get(ComponentType<? extends T> type)
      Specified by:
      get in interface ComponentMap
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/component/ComponentMap;get(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
      intermediary method_57829 Lnet/minecraft/class_9323;method_57829(Lnet/minecraft/class_9331;)Ljava/lang/Object;
      official a Lkq;a(Lkt;)Ljava/lang/Object;
    • set

      @Nullable public <T> T set(ComponentType<? super T> type, @Nullable T value)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/component/MergedComponentMap;set(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_57938 Lnet/minecraft/class_9335;method_57938(Lnet/minecraft/class_9331;Ljava/lang/Object;)Ljava/lang/Object;
      official b Lkv;b(Lkt;Ljava/lang/Object;)Ljava/lang/Object;
    • remove

      @Nullable public <T> T remove(ComponentType<? extends T> type)
      Mappings:
      Namespace Name Mixin selector
      named remove Lnet/minecraft/component/MergedComponentMap;remove(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
      intermediary method_57939 Lnet/minecraft/class_9335;method_57939(Lnet/minecraft/class_9331;)Ljava/lang/Object;
      official d Lkv;d(Lkt;)Ljava/lang/Object;
    • applyChanges

      public void applyChanges(ComponentChanges changes)
      Mappings:
      Namespace Name Mixin selector
      named applyChanges Lnet/minecraft/component/MergedComponentMap;applyChanges(Lnet/minecraft/component/ComponentChanges;)V
      intermediary method_57936 Lnet/minecraft/class_9335;method_57936(Lnet/minecraft/class_9326;)V
      official a Lkv;a(Lkr;)V
    • applyChange

      private void applyChange(ComponentType<?> type, Optional<?> optional)
      Mappings:
      Namespace Name Mixin selector
      named applyChange Lnet/minecraft/component/MergedComponentMap;applyChange(Lnet/minecraft/component/ComponentType;Ljava/util/Optional;)V
      intermediary method_57937 Lnet/minecraft/class_9335;method_57937(Lnet/minecraft/class_9331;Ljava/util/Optional;)V
      official a Lkv;a(Lkt;Ljava/util/Optional;)V
    • setChanges

      public void setChanges(ComponentChanges changes)
      Mappings:
      Namespace Name Mixin selector
      named setChanges Lnet/minecraft/component/MergedComponentMap;setChanges(Lnet/minecraft/component/ComponentChanges;)V
      intermediary method_59772 Lnet/minecraft/class_9335;method_59772(Lnet/minecraft/class_9326;)V
      official b Lkv;b(Lkr;)V
    • clearChanges

      public void clearChanges()
      Mappings:
      Namespace Name Mixin selector
      named clearChanges Lnet/minecraft/component/MergedComponentMap;clearChanges()V
      intermediary method_62714 Lnet/minecraft/class_9335;method_62714()V
      official f Lkv;f()V
    • setAll

      public void setAll(ComponentMap components)
      Mappings:
      Namespace Name Mixin selector
      named setAll Lnet/minecraft/component/MergedComponentMap;setAll(Lnet/minecraft/component/ComponentMap;)V
      intermediary method_57933 Lnet/minecraft/class_9335;method_57933(Lnet/minecraft/class_9323;)V
      official a Lkv;a(Lkq;)V
    • onWrite

      private void onWrite()
      Mappings:
      Namespace Name Mixin selector
      named onWrite Lnet/minecraft/component/MergedComponentMap;onWrite()V
      intermediary method_57942 Lnet/minecraft/class_9335;method_57942()V
      official i Lkv;i()V
    • getTypes

      public Set<ComponentType<?>> getTypes()
      Specified by:
      getTypes in interface ComponentMap
      Mappings:
      Namespace Name Mixin selector
      named getTypes Lnet/minecraft/component/ComponentMap;getTypes()Ljava/util/Set;
      intermediary method_57831 Lnet/minecraft/class_9323;method_57831()Ljava/util/Set;
      official b Lkq;b()Ljava/util/Set;
    • iterator

      public Iterator<Component<?>> iterator()
      Specified by:
      iterator in interface ComponentMap
      Specified by:
      iterator in interface Iterable<Component<?>>
    • size

      public int size()
      Specified by:
      size in interface ComponentMap
      Mappings:
      Namespace Name Mixin selector
      named size Lnet/minecraft/component/ComponentMap;size()I
      intermediary method_57835 Lnet/minecraft/class_9323;method_57835()I
      official d Lkq;d()I
    • getChanges

      public ComponentChanges getChanges()
      Mappings:
      Namespace Name Mixin selector
      named getChanges Lnet/minecraft/component/MergedComponentMap;getChanges()Lnet/minecraft/component/ComponentChanges;
      intermediary method_57940 Lnet/minecraft/class_9335;method_57940()Lnet/minecraft/class_9326;
      official g Lkv;g()Lkr;
    • copy

      public MergedComponentMap copy()
      Mappings:
      Namespace Name Mixin selector
      named copy Lnet/minecraft/component/MergedComponentMap;copy()Lnet/minecraft/component/MergedComponentMap;
      intermediary method_57941 Lnet/minecraft/class_9335;method_57941()Lnet/minecraft/class_9335;
      official h Lkv;h()Lkv;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/component/MergedComponentMap;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_9335;equals(Ljava/lang/Object;)Z
      official equals Lkv;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object