Record Class CreateRegistrateRegistrationCallbackImpl.CallbackImpl<T>
java.lang.Object
java.lang.Record
com.simibubi.create.impl.registrate.CreateRegistrateRegistrationCallbackImpl.CallbackImpl<T>
- Enclosing class:
CreateRegistrateRegistrationCallbackImpl
-
Constructor Summary
ConstructorsConstructorDescriptionCallbackImpl(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry, net.minecraft.resources.ResourceLocation id, Consumer<T> callback) Creates an instance of aCallbackImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncallback()Returns the value of thecallbackrecord 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.ResourceLocationid()Returns the value of theidrecord component.net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CallbackImpl
public CallbackImpl(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry, net.minecraft.resources.ResourceLocation id, Consumer<T> callback) Creates an instance of aCallbackImplrecord class.- Parameters:
registry- the value for theregistryrecord componentid- the value for theidrecord componentcallback- the value for thecallbackrecord component
-
-
Method Details
-
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). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
callback
Returns the value of thecallbackrecord component.- Returns:
- the value of the
callbackrecord component
-