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 NativeImage
The field for theimage
record component.private final TextureMetadataSection
The field for themetadata
record component. -
Constructor Summary
ConstructorsConstructorDescriptionTextureContents
(NativeImage image, TextureMetadataSection metadata) Creates an instance of aTextureContents
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
blur()
boolean
clamp()
void
close()
static TextureContents
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.image()
Returns the value of theimage
record component.static TextureContents
load
(ResourceManager p_389659_, ResourceLocation p_389563_) metadata()
Returns the value of themetadata
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
image
The field for theimage
record component. -
metadata
The field for themetadata
record component.
-
-
Constructor Details
-
TextureContents
Creates an instance of aTextureContents
record class.- Parameters:
image
- the value for theimage
record componentmetadata
- the value for themetadata
record component
-
-
Method Details
-
load
public static TextureContents load(ResourceManager p_389659_, ResourceLocation p_389563_) throws IOException - Throws:
IOException
-
createMissing
-
blur
public boolean blur() -
clamp
public boolean clamp() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in 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 theimage
record component.- Returns:
- the value of the
image
record component
-
metadata
Returns the value of themetadata
record component.- Returns:
- the value of the
metadata
record component
-