Record Class ImageResource.PackAsset
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.gui.modlist.ImageResource.PackAsset
- All Implemented Interfaces:
ImageResource
- Enclosing interface:
ImageResource
@Internal
public static record ImageResource.PackAsset(Identifier path)
extends Record
implements ImageResource
-
Nested Class Summary
Nested classes/interfaces inherited from interface ImageResource
ImageResource.PackAsset, ImageResource.PackRoot -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentifierThe field for thepathrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.get(ResourceManager resourceManager) Retrieves the image resource contents from the given resource manager.final inthashCode()Returns a hash code value for this object.path()Returns the value of thepathrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
path
The field for thepathrecord component.
-
-
Constructor Details
-
PackAsset
Creates an instance of aPackAssetrecord class.- Parameters:
path- the value for thepathrecord component
-
-
Method Details
-
get
Description copied from interface:ImageResourceRetrieves the image resource contents from the given resource manager. If the resource does not exist, this returnsnull.- Specified by:
getin interfaceImageResource- Parameters:
resourceManager- the resource manager, which is expected to contain client-side resource packs- Returns:
- the supplier for the image bytes
-
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). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-