Package net.minecraft.util.registry
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$cintermediary net/minecraft/class_5455$class_5456named net/minecraft/util/registry/DynamicRegistryManager$Infoofficial aintermediary comp_293named registryofficial bintermediary comp_294named entryCodecofficial cintermediary comp_295named networkEntryCodec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<E>The field for theentryCodecrecord component.The field for thenetworkEntryCodecrecord component.private final RegistryKey<? extends Registry<E>>The field for theregistryrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<E>Returns the value of theentryCodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisSynced()Returns the value of thenetworkEntryCodecrecord component.RegistryKey<? extends Registry<E>>registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
registry
The field for theregistryrecord component. -
entryCodec
The field for theentryCodecrecord component. -
networkEntryCodec
The field for thenetworkEntryCodecrecord 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 aInforecord class.- Parameters:
registry- the value for theregistryrecord componententryCodec- the value for theentryCodecrecord componentnetworkEntryCodec- the value for thenetworkEntryCodecrecord component
-
-
Method Details
-
isSynced
public boolean isSynced()- Mappings:
Namespace Name Mixin selector official aLhn$c;a()Zintermediary method_30537Lnet/minecraft/class_5455$class_5456;method_30537()Znamed isSyncedLnet/minecraft/util/registry/DynamicRegistryManager$Info;isSynced()Z
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
entryCodec
Returns the value of theentryCodecrecord component.- Returns:
- the value of the
entryCodecrecord component
-
networkEntryCodec
Returns the value of thenetworkEntryCodecrecord component.- Returns:
- the value of the
networkEntryCodecrecord component
-