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(ResourceLocation sprite, double x, double y, double width, double height)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Unstitcher.Region>private final doubleThe field for theheightrecord component.private final ResourceLocationThe 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 SummaryConstructorsConstructorDescriptionRegion(ResourceLocation sprite, double x, double y, double width, double height) Creates an instance of aRegionrecord class.
- 
Method SummaryModifier 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- 
spriteThe field for thespriterecord component.
- 
xprivate final double xThe field for thexrecord component.
- 
yprivate final double yThe field for theyrecord component.
- 
widthprivate final double widthThe field for thewidthrecord component.
- 
heightprivate final double heightThe field for theheightrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
RegionCreates an instance of aRegionrecord class.- Parameters:
- sprite- the value for the- spriterecord component
- x- the value for the- xrecord component
- y- the value for the- yrecord component
- width- the value for the- widthrecord component
- height- the value for the- heightrecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
spriteReturns the value of thespriterecord component.- Returns:
- the value of the spriterecord component
 
- 
xpublic double x()Returns the value of thexrecord component.- Returns:
- the value of the xrecord component
 
- 
ypublic double y()Returns the value of theyrecord component.- Returns:
- the value of the yrecord component
 
- 
widthpublic double width()Returns the value of thewidthrecord component.- Returns:
- the value of the widthrecord component
 
- 
heightpublic double height()Returns the value of theheightrecord component.- Returns:
- the value of the heightrecord component
 
 
-