Package dev.latvian.mods.kubejs.registry
Record Class BuilderTypeRegistryHandler
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.registry.BuilderTypeRegistryHandler
- All Implemented Interfaces:
BuilderTypeRegistry,ServerRegistryRegistry
public record BuilderTypeRegistryHandler(Map<net.minecraft.resources.ResourceKey<?>,BuilderTypeRegistryHandler.Info<?>> map)
extends Record
implements BuilderTypeRegistry, ServerRegistryRegistry
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface dev.latvian.mods.kubejs.registry.BuilderTypeRegistry
BuilderTypeRegistry.Callback<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Lazy<Map<net.minecraft.resources.ResourceKey<?>, BuilderTypeRegistryHandler.Info<?>>> -
Constructor Summary
ConstructorsConstructorDescriptionBuilderTypeRegistryHandler(Map<net.minecraft.resources.ResourceKey<?>, BuilderTypeRegistryHandler.Info<?>> map) Creates an instance of aBuilderTypeRegistryHandlerrecord 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> BuilderTypeRegistryHandler.Info<T> info(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key) Map<net.minecraft.resources.ResourceKey<?>, BuilderTypeRegistryHandler.Info<?>> map()Returns the value of themaprecord component.<T> voidof(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, Consumer<BuilderTypeRegistry.Callback<T>> callback) <T> voidregister(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, com.mojang.serialization.Codec<T> directCodec, dev.latvian.mods.rhino.type.TypeInfo typeInfo) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.registry.BuilderTypeRegistry
addDefaultMethods inherited from interface dev.latvian.mods.kubejs.registry.ServerRegistryRegistry
register
-
Field Details
-
INFO
public static final Lazy<Map<net.minecraft.resources.ResourceKey<?>,BuilderTypeRegistryHandler.Info<?>>> INFO
-
-
Constructor Details
-
BuilderTypeRegistryHandler
public BuilderTypeRegistryHandler(Map<net.minecraft.resources.ResourceKey<?>, BuilderTypeRegistryHandler.Info<?>> map) Creates an instance of aBuilderTypeRegistryHandlerrecord class.- Parameters:
map- the value for themaprecord component
-
-
Method Details
-
info
public static <T> BuilderTypeRegistryHandler.Info<T> info(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key) -
of
public <T> void of(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, Consumer<BuilderTypeRegistry.Callback<T>> callback) - Specified by:
ofin interfaceBuilderTypeRegistry
-
register
public <T> void register(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, com.mojang.serialization.Codec<T> directCodec, dev.latvian.mods.rhino.type.TypeInfo typeInfo) - Specified by:
registerin interfaceServerRegistryRegistry
-
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). -
map
Returns the value of themaprecord component.- Returns:
- the value of the
maprecord component
-