Record Class Unstitcher.Region
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.Unstitcher.Region
- Enclosing class:
- Unstitcher
static record Unstitcher.Region(ResourceLocation sprite, double x, double y, double width, double height)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Unstitcher.Region>
private final double
The field for theheight
record component.private final ResourceLocation
The field for thesprite
record component.private final double
The field for thewidth
record component.private final double
The field for thex
record component.private final double
The field for they
record component. -
Constructor Summary
ConstructorDescriptionRegion
(ResourceLocation sprite, double x, double y, double width, double height) Creates an instance of aRegion
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.double
height()
Returns the value of theheight
record component.sprite()
Returns the value of thesprite
record component.final String
toString()
Returns a string representation of this record class.double
width()
Returns the value of thewidth
record component.double
x()
Returns the value of thex
record component.double
y()
Returns the value of they
record component.
-
Field Details
-
sprite
The field for thesprite
record component. -
x
private final double xThe field for thex
record component. -
y
private final double yThe field for they
record component. -
width
private final double widthThe field for thewidth
record component. -
height
private final double heightThe field for theheight
record component. -
CODEC
-
-
Constructor Details
-
Region
Region(ResourceLocation sprite, double x, double y, double width, double height) Creates an instance of aRegion
record class.- Parameters:
sprite
- the value for thesprite
record componentx
- the value for thex
record componenty
- the value for they
record componentwidth
- the value for thewidth
record componentheight
- the value for theheight
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
sprite
Returns the value of thesprite
record component.- Returns:
- the value of the
sprite
record component
-
x
public double x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
y
public double y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
width
public double width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public double height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-