Record Class FocusedRect
java.lang.Object
java.lang.Record
net.minecraft.client.gui.navigation.FocusedRect
- Record Components:
position
-width
-height
-
@Environment(CLIENT)
public record FocusedRect(FocusedPos position, int width, int height)
extends Record
A rectangle on the screen that is focused.
- Mappings:
Namespace Name official eqe
intermediary net/minecraft/class_8030
named net/minecraft/client/gui/navigation/FocusedRect
official a
intermediary comp_1195
named position
official b
intermediary comp_1196
named width
official c
intermediary comp_1197
named height
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final FocusedRect
private final int
The field for theheight
record component.private final FocusedPos
The field for theposition
record component.private final int
The field for thewidth
record component. -
Constructor Summary
ConstructorDescriptionFocusedRect
(int sameAxis, int otherAxis, int width, int height) FocusedRect
(FocusedPos focusedPos, int int2, int int3) -
Method Summary
Modifier and TypeMethodDescriptionadd
(NavigationDirection direction) Returns a new rect of the same dimensions with the position incremented.static FocusedRect
empty()
Returns an empty rect.final boolean
Indicates whether some other object is "equal to" this one.getBorder
(NavigationDirection direction) Returns a rect representing the border of this rect in the givendirection
.int
getBoundingCoordinate
(NavigationDirection direction) Returns the coordinate of the bounding box in the givendirection
.int
getCenter
(NavigationAxis axis) Returns the center of this rect in the givenaxis
.int
getLength
(NavigationAxis axis) Returns the length of the rect in the givenaxis
.final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.static FocusedRect
of
(NavigationAxis axis, int sameAxisCoord, int otherAxisCoord, int sameAxisLength, int otherAxisLength) Returns a new rect.boolean
overlaps
(FocusedRect other) Returns whether this rect overlaps withrect
in both axes.boolean
overlaps
(FocusedRect other, NavigationAxis axis) Returns whether this rect overlaps withrect
inaxis
.position()
Returns the value of theposition
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.
-
Field Details
-
position
The field for theposition
record component. -
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
EMPTY
- Mappings:
Namespace Name Mixin selector official d
Leqe;d:Leqe;
intermediary field_41835
Lnet/minecraft/class_8030;field_41835:Lnet/minecraft/class_8030;
named EMPTY
Lnet/minecraft/client/gui/navigation/FocusedRect;EMPTY:Lnet/minecraft/client/gui/navigation/FocusedRect;
-
-
Constructor Details
-
FocusedRect
public FocusedRect(int sameAxis, int otherAxis, int width, int height) - Mappings:
Namespace Name Mixin selector official <init>
Leqe;<init>(IIII)V
intermediary <init>
Lnet/minecraft/class_8030;<init>(IIII)V
named <init>
Lnet/minecraft/client/gui/navigation/FocusedRect;<init>(IIII)V
-
-
Method Details
-
empty
Returns an empty rect.- Returns:
- an empty rect
- Mappings:
Namespace Name Mixin selector official a
Leqe;a()Leqe;
intermediary method_48248
Lnet/minecraft/class_8030;method_48248()Lnet/minecraft/class_8030;
named empty
Lnet/minecraft/client/gui/navigation/FocusedRect;empty()Lnet/minecraft/client/gui/navigation/FocusedRect;
-
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 '=='. -
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-