Record Class NeoForgeUnifiedRegistries.DeferredRegistry<Y>
java.lang.Object
java.lang.Record
net.rebel459.unified.neoforge.core.NeoForgeUnifiedRegistries.DeferredRegistry<Y>
- All Implemented Interfaces:
UnifiedRegistries.DeferredRegistry<Y>
- Enclosing class:
NeoForgeUnifiedRegistries
public static record NeoForgeUnifiedRegistries.DeferredRegistry<Y>(String modId, net.minecraft.core.Registry<?> registry)
extends Record
implements UnifiedRegistries.DeferredRegistry<Y>
-
Constructor Summary
ConstructorsConstructorDescriptionDeferredRegistry(String modId, net.minecraft.core.Registry<?> registry) Creates an instance of aDeferredRegistryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlias(net.minecraft.resources.Identifier convertedFrom, net.minecraft.resources.Identifier convertedTo) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modId()Returns the value of themodIdrecord component.net.minecraft.core.Registry<?> registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeferredRegistry
Creates an instance of aDeferredRegistryrecord class.- Parameters:
modId- the value for themodIdrecord componentregistry- the value for theregistryrecord component
-
-
Method Details
-
register
-
addAlias
public void addAlias(net.minecraft.resources.Identifier convertedFrom, net.minecraft.resources.Identifier convertedTo) - Specified by:
addAliasin interfaceUnifiedRegistries.DeferredRegistry<Y>
-
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). -
modId
Returns the value of themodIdrecord component.- Specified by:
modIdin interfaceUnifiedRegistries.DeferredRegistry<Y>- Returns:
- the value of the
modIdrecord component
-
registry
public net.minecraft.core.Registry<?> registry()Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-