Record Class CustomRegistryMetaInfo<T>
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.registry.CustomRegistryMetaInfo<T>
public record CustomRegistryMetaInfo<T>(RegistryKeys<T> registryKeys, List<CustomRegistryMetaInfo.TypeInfo<T>> typeInfos)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, CustomRegistryMetaInfo<?>> -
Constructor Summary
ConstructorsConstructorDescriptionCustomRegistryMetaInfo(RegistryKeys<T> registryKeys, List<CustomRegistryMetaInfo.TypeInfo<T>> typeInfos) Creates an instance of aCustomRegistryMetaInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static <T> CustomRegistryMetaInfo<T> read(io.netty.buffer.ByteBuf buf) Returns the value of theregistryKeysrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetypeInfosrecord component.static <T> voidwrite(io.netty.buffer.ByteBuf buf, CustomRegistryMetaInfo<T> info)
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, CustomRegistryMetaInfo<?>> STREAM_CODEC
-
-
Constructor Details
-
CustomRegistryMetaInfo
public CustomRegistryMetaInfo(RegistryKeys<T> registryKeys, List<CustomRegistryMetaInfo.TypeInfo<T>> typeInfos) Creates an instance of aCustomRegistryMetaInforecord class.- Parameters:
registryKeys- the value for theregistryKeysrecord componenttypeInfos- the value for thetypeInfosrecord component
-
-
Method Details
-
read
-
write
-
toString
-
hashCode
-
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). -
registryKeys
Returns the value of theregistryKeysrecord component.- Returns:
- the value of the
registryKeysrecord component
-
typeInfos
Returns the value of thetypeInfosrecord component.- Returns:
- the value of the
typeInfosrecord component
-