Record Class IdentifierWrapper
java.lang.Object
java.lang.Record
top.offsetmonkey538.monkeylib538.modded.v1201.impl.wrapper.IdentifierWrapper
- All Implemented Interfaces:
Identifier,ModdedIdentifier,ModdedVersionIdentifier
public record IdentifierWrapper(net.minecraft.resources.ResourceLocation vanillaIdentifier)
extends Record
implements ModdedVersionIdentifier
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classNested classes/interfaces inherited from interface top.offsetmonkey538.monkeylib538.common.api.wrapper.Identifier
Identifier.CodecProvider, Identifier.InstantiatorNested classes/interfaces inherited from interface top.offsetmonkey538.monkeylib538.modded.api.wrapper.ModdedIdentifier
ModdedIdentifier.ModdedInstantiator -
Field Summary
Fields inherited from interface top.offsetmonkey538.monkeylib538.common.api.wrapper.Identifier
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionIdentifierWrapper(net.minecraft.resources.ResourceLocation vanillaIdentifier) Creates an instance of aIdentifierWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationget()getPath()final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.net.minecraft.resources.ResourceLocationReturns the value of thevanillaIdentifierrecord component.
-
Constructor Details
-
IdentifierWrapper
public IdentifierWrapper(net.minecraft.resources.ResourceLocation vanillaIdentifier) Creates an instance of aIdentifierWrapperrecord class.- Parameters:
vanillaIdentifier- the value for thevanillaIdentifierrecord component
-
-
Method Details
-
getNamespace
- Specified by:
getNamespacein interfaceIdentifier
-
getPath
- Specified by:
getPathin interfaceIdentifier
-
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. -
get
public net.minecraft.resources.ResourceLocation get()- Specified by:
getin interfaceModdedVersionIdentifier
-
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). -
vanillaIdentifier
public net.minecraft.resources.ResourceLocation vanillaIdentifier()Returns the value of thevanillaIdentifierrecord component.- Returns:
- the value of the
vanillaIdentifierrecord component
-