Record Class TextureContents
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.TextureContents
- All Implemented Interfaces:
Closeable,AutoCloseable
public record TextureContents(NativeImage image, @Nullable TextureMetadataSection metadata)
extends Record
implements Closeable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NativeImageThe field for theimagerecord component.private final TextureMetadataSectionThe field for themetadatarecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTextureContents(NativeImage image, TextureMetadataSection metadata) Creates an instance of aTextureContentsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanblur()booleanclamp()voidclose()static TextureContentsfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.image()Returns the value of theimagerecord component.static TextureContentsload(ResourceManager pResourceManager, ResourceLocation pTextureId) metadata()Returns the value of themetadatarecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
image
The field for theimagerecord component. -
metadata
The field for themetadatarecord component.
-
-
Constructor Details
-
TextureContents
Creates an instance of aTextureContentsrecord class.- Parameters:
image- the value for theimagerecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
load
public static TextureContents load(ResourceManager pResourceManager, ResourceLocation pTextureId) throws IOException - Throws:
IOException
-
createMissing
-
blur
public boolean blur() -
clamp
public boolean clamp() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
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). -
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-