Record Class DynamicRegistryManager.Info<E>

java.lang.Object
java.lang.Record
net.minecraft.util.registry.DynamicRegistryManager.Info<E>
Record Components:
registry -
entryCodec -
networkEntryCodec -
Enclosing interface:
DynamicRegistryManager

public static record DynamicRegistryManager.Info<E>(RegistryKey<? extends Registry<E>> registry, com.mojang.serialization.Codec<E> entryCodec, @Nullable com.mojang.serialization.Codec<E> networkEntryCodec) extends Record
Represents the serialization behavior of the registries, including the id of the registry, the codec for its elements, and whether the registry should be sent to the client.
Mappings:
Namespace Name
official hn$c
intermediary net/minecraft/class_5455$class_5456
named net/minecraft/util/registry/DynamicRegistryManager$Info
official a
intermediary comp_293
named registry
official b
intermediary comp_294
named entryCodec
official c
intermediary comp_295
named networkEntryCodec
  • Field Details

    • registry

      private final RegistryKey<? extends Registry<E>> registry
      The field for the registry record component.
    • entryCodec

      private final com.mojang.serialization.Codec<E> entryCodec
      The field for the entryCodec record component.
    • networkEntryCodec

      @Nullable private final @Nullable com.mojang.serialization.Codec<E> networkEntryCodec
      The field for the networkEntryCodec record component.
  • Constructor Details

    • Info

      public Info(RegistryKey<? extends Registry<E>> registry, com.mojang.serialization.Codec<E> entryCodec, @Nullable @Nullable com.mojang.serialization.Codec<E> networkEntryCodec)
      Creates an instance of a Info record class.
      Parameters:
      registry - the value for the registry record component
      entryCodec - the value for the entryCodec record component
      networkEntryCodec - the value for the networkEntryCodec record component
  • Method Details

    • isSynced

      public boolean isSynced()
      Mappings:
      Namespace Name Mixin selector
      official a Lhn$c;a()Z
      intermediary method_30537 Lnet/minecraft/class_5455$class_5456;method_30537()Z
      named isSynced Lnet/minecraft/util/registry/DynamicRegistryManager$Info;isSynced()Z
    • toString

      public final 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.
    • registry

      public RegistryKey<? extends Registry<E>> registry()
      Returns the value of the registry record component.
      Returns:
      the value of the registry record component
    • entryCodec

      public com.mojang.serialization.Codec<E> entryCodec()
      Returns the value of the entryCodec record component.
      Returns:
      the value of the entryCodec record component
    • networkEntryCodec

      @Nullable public @Nullable com.mojang.serialization.Codec<E> networkEntryCodec()
      Returns the value of the networkEntryCodec record component.
      Returns:
      the value of the networkEntryCodec record component