Record Class GuiSpriteScaling.NineSlice
java.lang.Object
java.lang.Record
net.minecraft.client.resources.metadata.gui.GuiSpriteScaling.NineSlice
- All Implemented Interfaces:
GuiSpriteScaling
- Enclosing interface:
GuiSpriteScaling
public static record GuiSpriteScaling.NineSlice(int width, int height, GuiSpriteScaling.NineSlice.Border border)
extends Record
implements GuiSpriteScaling
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.resources.metadata.gui.GuiSpriteScaling
GuiSpriteScaling.NineSlice, GuiSpriteScaling.Stretch, GuiSpriteScaling.Tile, GuiSpriteScaling.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GuiSpriteScaling.NineSlice.BorderThe field for theborderrecord component.static final com.mojang.serialization.MapCodec<GuiSpriteScaling.NineSlice> private final intThe field for theheightrecord component.private final intThe field for thewidthrecord component.Fields inherited from interface net.minecraft.client.resources.metadata.gui.GuiSpriteScaling
DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionNineSlice(int width, int height, GuiSpriteScaling.NineSlice.Border border) Creates an instance of aNineSlicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionborder()Returns the value of theborderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.final StringtoString()Returns a string representation of this record class.type()private static com.mojang.serialization.DataResult<GuiSpriteScaling.NineSlice> validate(GuiSpriteScaling.NineSlice p_299275_) intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
border
The field for theborderrecord component. -
CODEC
-
-
Constructor Details
-
NineSlice
Creates an instance of aNineSlicerecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentborder- the value for theborderrecord component
-
-
Method Details
-
validate
private static com.mojang.serialization.DataResult<GuiSpriteScaling.NineSlice> validate(GuiSpriteScaling.NineSlice p_299275_) -
type
- Specified by:
typein interfaceGuiSpriteScaling
-
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 '=='. -
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
border
Returns the value of theborderrecord component.- Returns:
- the value of the
borderrecord component
-