Record Class GuiSpriteScaling.NineSlice.Border
java.lang.Object
java.lang.Record
net.minecraft.client.resources.metadata.gui.GuiSpriteScaling.NineSlice.Border
- Enclosing class:
GuiSpriteScaling.NineSlice
public static record GuiSpriteScaling.NineSlice.Border(int left, int top, int right, int bottom)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebottomrecord component.(package private) static final com.mojang.serialization.Codec<GuiSpriteScaling.NineSlice.Border> private final intThe field for theleftrecord component.private static final com.mojang.serialization.Codec<GuiSpriteScaling.NineSlice.Border> private final intThe field for therightrecord component.private final intThe field for thetoprecord component.private static final com.mojang.serialization.Codec<GuiSpriteScaling.NineSlice.Border> -
Constructor Summary
ConstructorsConstructorDescriptionBorder(int left, int top, int right, int bottom) Creates an instance of aBorderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbottom()Returns the value of thebottomrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intleft()Returns the value of theleftrecord component.intright()Returns the value of therightrecord component.inttop()Returns the value of thetoprecord component.final StringtoString()Returns a string representation of this record class.private OptionalInt
-
Field Details
-
left
private final int leftThe field for theleftrecord component. -
top
private final int topThe field for thetoprecord component. -
right
private final int rightThe field for therightrecord component. -
bottom
private final int bottomThe field for thebottomrecord component. -
VALUE_CODEC
-
RECORD_CODEC
-
CODEC
-
-
Constructor Details
-
Border
public Border(int left, int top, int right, int bottom) Creates an instance of aBorderrecord class.- Parameters:
left- the value for theleftrecord componenttop- the value for thetoprecord componentright- the value for therightrecord componentbottom- the value for thebottomrecord component
-
-
Method Details
-
unpackValue
-
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 with '=='. -
left
public int left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
top
public int top()Returns the value of thetoprecord component.- Returns:
- the value of the
toprecord component
-
right
public int right()Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
bottom
public int bottom()Returns the value of thebottomrecord component.- Returns:
- the value of the
bottomrecord component
-