Record Class CustomRegistryValueInfo<T>
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.registry.CustomRegistryValueInfo<T>
public record CustomRegistryValueInfo<T>(RegistryKeys<T> registryKeys, List<CustomRegistryValueInfo.ValueInfo<T>> valueInfos)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, CustomRegistryValueInfo<?>> -
Constructor Summary
ConstructorsConstructorDescriptionCustomRegistryValueInfo(RegistryKeys<T> registryKeys, List<CustomRegistryValueInfo.ValueInfo<T>> valueInfos) Creates an instance of aCustomRegistryValueInforecord 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> CustomRegistryValueInfo<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 thevalueInfosrecord component.static <T> voidwrite(io.netty.buffer.ByteBuf buf, CustomRegistryValueInfo<T> info)
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, CustomRegistryValueInfo<?>> STREAM_CODEC
-
-
Constructor Details
-
CustomRegistryValueInfo
public CustomRegistryValueInfo(RegistryKeys<T> registryKeys, List<CustomRegistryValueInfo.ValueInfo<T>> valueInfos) Creates an instance of aCustomRegistryValueInforecord class.- Parameters:
registryKeys- the value for theregistryKeysrecord componentvalueInfos- the value for thevalueInfosrecord 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
-
valueInfos
Returns the value of thevalueInfosrecord component.- Returns:
- the value of the
valueInfosrecord component
-