Record Class RegistryUtil.TagCreator<T>
java.lang.Object
java.lang.Record
net.ntrdeal.realapi.util.RegistryUtil.TagCreator<T>
- Enclosing class:
RegistryUtil
-
Constructor Summary
ConstructorsConstructorDescriptionTagCreator(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, Function<String, net.minecraft.resources.Identifier> function) Creates an instance of aTagCreatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.tags.TagKey<T> final booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TagCreator
public TagCreator(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, Function<String, net.minecraft.resources.Identifier> function) Creates an instance of aTagCreatorrecord class.- Parameters:
registry- the value for theregistryrecord componentfunction- the value for thefunctionrecord component
-
-
Method Details
-
create
-
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). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
function
-