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
Modifier and TypeFieldDescriptionprivate final int
The field for thebottom
record component.(package private) static final com.mojang.serialization.Codec<GuiSpriteScaling.NineSlice.Border>
private final int
The field for theleft
record component.private static final com.mojang.serialization.Codec<GuiSpriteScaling.NineSlice.Border>
private final int
The field for theright
record component.private final int
The field for thetop
record component.private static final com.mojang.serialization.Codec<GuiSpriteScaling.NineSlice.Border>
-
Constructor Summary
ConstructorDescriptionBorder
(int left, int top, int right, int bottom) Creates an instance of aBorder
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
bottom()
Returns the value of thebottom
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
left()
Returns the value of theleft
record component.int
right()
Returns the value of theright
record component.int
top()
Returns the value of thetop
record component.final String
toString()
Returns a string representation of this record class.private OptionalInt
-
Field Details
-
left
private final int leftThe field for theleft
record component. -
top
private final int topThe field for thetop
record component. -
right
private final int rightThe field for theright
record component. -
bottom
private final int bottomThe field for thebottom
record component. -
VALUE_CODEC
-
RECORD_CODEC
-
CODEC
-
-
Constructor Details
-
Border
public Border(int left, int top, int right, int bottom) Creates an instance of aBorder
record class.- Parameters:
left
- the value for theleft
record componenttop
- the value for thetop
record componentright
- the value for theright
record componentbottom
- the value for thebottom
record 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 theleft
record component.- Returns:
- the value of the
left
record component
-
top
public int top()Returns the value of thetop
record component.- Returns:
- the value of the
top
record component
-
right
public int right()Returns the value of theright
record component.- Returns:
- the value of the
right
record component
-
bottom
public int bottom()Returns the value of thebottom
record component.- Returns:
- the value of the
bottom
record component
-