Record Class ThermooRegistriesImpl.DynamicRegistry<T>
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.impl.neoforge.platform.ThermooRegistriesImpl.DynamicRegistry<T>
- Enclosing class:
ThermooRegistriesImpl
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicRegistry(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> codec, boolean sync) Creates an instance of aDynamicRegistryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<T> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key()Returns the value of thekeyrecord component.voidonNewRegistry(net.neoforged.neoforge.registries.DataPackRegistryEvent.NewRegistry event) booleansync()Returns the value of thesyncrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DynamicRegistry
public DynamicRegistry(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> key, com.mojang.serialization.Codec<T> codec, boolean sync) Creates an instance of aDynamicRegistryrecord class.- Parameters:
key- the value for thekeyrecord componentcodec- the value for thecodecrecord componentsync- the value for thesyncrecord component
-
-
Method Details
-
onNewRegistry
public void onNewRegistry(net.neoforged.neoforge.registries.DataPackRegistryEvent.NewRegistry event) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
sync
public boolean sync()Returns the value of thesyncrecord component.- Returns:
- the value of the
syncrecord component
-