Record Class DataRegistryAdapter
java.lang.Object
java.lang.Record
net.darkhax.bookshelf.common.impl.registry.adapter.DataRegistryAdapter
public record DataRegistryAdapter(RegistrationContext context, DataRegistryAdapter.Adapter adapter)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDataRegistryAdapter(RegistrationContext context, DataRegistryAdapter.Adapter adapter) Creates an instance of aDataRegistryAdapterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadapter()Returns the value of theadapterrecord component.<T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> add(String name, com.mojang.serialization.Codec<T> dataCodec, @Nullable com.mojang.serialization.Codec<T> syncCodec) <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> add(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> dataCodec, @Nullable com.mojang.serialization.Codec<T> syncCodec) <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> addSynced(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> dataCodec) <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> addUnsynced(String name, com.mojang.serialization.Codec<T> dataCodec) <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> addUnsynced(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> dataCodec) context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataRegistryAdapter
Creates an instance of aDataRegistryAdapterrecord class.- Parameters:
context- the value for thecontextrecord componentadapter- the value for theadapterrecord component
-
-
Method Details
-
addSynced
public <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> addSynced(String name, com.mojang.serialization.Codec<T> dataCodec) -
addSynced
public <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> addSynced(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> dataCodec) -
addUnsynced
public <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> addUnsynced(String name, com.mojang.serialization.Codec<T> dataCodec) -
addUnsynced
public <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> addUnsynced(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> dataCodec) -
add
public <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> add(String name, com.mojang.serialization.Codec<T> dataCodec, @Nullable com.mojang.serialization.Codec<T> syncCodec) -
add
public <T> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> add(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> dataCodec, @Nullable com.mojang.serialization.Codec<T> syncCodec) -
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). -
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
adapter
Returns the value of theadapterrecord component.- Returns:
- the value of the
adapterrecord component
-