Record Class ComponentMap.Builder.SimpleComponentMap

java.lang.Object
java.lang.Record
net.minecraft.component.ComponentMap.Builder.SimpleComponentMap
Record Components:
map -
All Implemented Interfaces:
Iterable<Component<?>>, ComponentMap
Enclosing class:
ComponentMap.Builder

private static record ComponentMap.Builder.SimpleComponentMap(Reference2ObjectMap<DataComponentType<?>,Object> map) extends Record implements ComponentMap
Mappings:
Namespace Name
named net/minecraft/component/ComponentMap$Builder$SimpleComponentMap
intermediary net/minecraft/class_9323$class_9324$class_9325
official ki$a$a
named map
intermediary comp_2440
official c
  • Field Details

  • Constructor Details

  • Method Details

    • get

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

      public boolean contains(DataComponentType<?> type)
      Specified by:
      contains in interface ComponentMap
      Mappings:
      Namespace Name Mixin selector
      named contains Lnet/minecraft/component/ComponentMap;contains(Lnet/minecraft/component/DataComponentType;)Z
      intermediary method_57832 Lnet/minecraft/class_9323;method_57832(Lnet/minecraft/class_9331;)Z
      official b Lki;b(Lkl;)Z
    • getTypes

      public Set<DataComponentType<?>> 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 Lki;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 Lki;d()I
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • map

      Returns the value of the map record component.
      Returns:
      the value of the map record component