Record Class Unstitcher.Region
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.Unstitcher.Region
- Enclosing class:
Unstitcher
public static record Unstitcher.Region(Identifier sprite, double x, double y, double width, double height)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Unstitcher.Region> private final doubleThe field for theheightrecord component.private final IdentifierThe field for thespriterecord component.private final doubleThe field for thewidthrecord component.private final doubleThe field for thexrecord component.private final doubleThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRegion(Identifier sprite, double x, double y, double width, double height) Creates an instance of aRegionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheight()Returns the value of theheightrecord component.sprite()Returns the value of thespriterecord component.final StringtoString()Returns a string representation of this record class.doublewidth()Returns the value of thewidthrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Field Details
-
sprite
The field for thespriterecord component. -
x
private final double xThe field for thexrecord component. -
y
private final double yThe field for theyrecord component. -
width
private final double widthThe field for thewidthrecord component. -
height
private final double heightThe field for theheightrecord component. -
CODEC
-
-
Constructor Details
-
Region
Creates an instance of aRegionrecord class.- Parameters:
sprite- the value for thespriterecord componentx- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
width
public double width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public double height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-