Skip to content

Package net.minecraft.client.gui.navigation

Part 1/1


CommonInputs

  • Full name: net.minecraft.client.gui.navigation.CommonInputs
  • Package: net.minecraft.client.gui.navigation
  • Source: clientOnlynet/minecraft/client/gui/navigation/CommonInputs.java
  • Type: class
  • Modifiers: public

net.minecraft.client.gui.navigation.CommonInputs#selected(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/CommonInputs.java:8
  • Modifiers: public static
  • Return: boolean

คืออะไร

ดำเนินการ selected ตาม implementation ของ CommonInputs

ทำงานยังไง

คืนค่า: i == 257 || i == 32 || i == 335.

Parameters

  • int i

ตัวอย่างใช้งาน

boolean result = CommonInputs.selected(0);

FocusNavigationEvent

  • Full name: net.minecraft.client.gui.navigation.FocusNavigationEvent
  • Package: net.minecraft.client.gui.navigation
  • Source: clientOnlynet/minecraft/client/gui/navigation/FocusNavigationEvent.java
  • Type: interface
  • Modifiers: public

net.minecraft.client.gui.navigation.FocusNavigationEvent#getVerticalDirectionForInitialFocus()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/FocusNavigationEvent.java:8
  • Modifiers: ``
  • Return: ScreenDirection

คืออะไร

อ่านค่า Vertical Direction For Initial Focus

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FocusNavigationEvent instance = ...;
ScreenDirection result = instance.getVerticalDirectionForInitialFocus();

ScreenAxis

  • Full name: net.minecraft.client.gui.navigation.ScreenAxis
  • Package: net.minecraft.client.gui.navigation
  • Source: clientOnlynet/minecraft/client/gui/navigation/ScreenAxis.java
  • Type: enum
  • Modifiers: public

net.minecraft.client.gui.navigation.ScreenAxis#getDirection(boolean)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenAxis.java:32
  • Modifiers: public
  • Return: ScreenDirection

คืออะไร

อ่านค่า Direction

ทำงานยังไง

เรียกต่อ: getPositive(), getNegative(). คืนค่า: bl ? this.getPositive() : this.getNegative().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

ScreenAxis instance = ...;
ScreenDirection result = instance.getDirection(true);

net.minecraft.client.gui.navigation.ScreenAxis#getNegative()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenAxis.java:25
  • Modifiers: public
  • Return: ScreenDirection

คืออะไร

อ่านค่า Negative

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (this) { case HORIZONTAL -> ScreenDirection.LEFT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenAxis instance = ...;
ScreenDirection result = instance.getNegative();

net.minecraft.client.gui.navigation.ScreenAxis#getPositive()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenAxis.java:18
  • Modifiers: public
  • Return: ScreenDirection

คืออะไร

อ่านค่า Positive

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (this) { case HORIZONTAL -> ScreenDirection.RIGHT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenAxis instance = ...;
ScreenDirection result = instance.getPositive();

net.minecraft.client.gui.navigation.ScreenAxis#orthogonal()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenAxis.java:11
  • Modifiers: public
  • Return: ScreenAxis

คืออะไร

ดำเนินการ orthogonal ตาม implementation ของ ScreenAxis

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (this) { case HORIZONTAL -> VERTICAL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenAxis instance = ...;
ScreenAxis result = instance.orthogonal();

ScreenDirection

  • Full name: net.minecraft.client.gui.navigation.ScreenDirection
  • Package: net.minecraft.client.gui.navigation
  • Source: clientOnlynet/minecraft/client/gui/navigation/ScreenDirection.java
  • Type: enum
  • Modifiers: public

net.minecraft.client.gui.navigation.ScreenDirection#coordinateValueComparator()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenDirection.java:47
  • Modifiers: public
  • Return: IntComparator

คืออะไร

ดำเนินการ coordinateValueComparator ตาม implementation ของ ScreenDirection

ทำงานยังไง

คืนค่า: this.coordinateValueComparator.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenDirection instance = ...;
IntComparator result = instance.coordinateValueComparator();

net.minecraft.client.gui.navigation.ScreenDirection#getAxis()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenDirection.java:16
  • Modifiers: public
  • Return: ScreenAxis

คืออะไร

อ่านค่า Axis

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (this) { case UP, DOWN -> ScreenAxis.VERTICAL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenDirection instance = ...;
ScreenAxis result = instance.getAxis();

net.minecraft.client.gui.navigation.ScreenDirection#getOpposite()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenDirection.java:23
  • Modifiers: public
  • Return: ScreenDirection

คืออะไร

อ่านค่า Opposite

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (this) { case UP -> DOWN.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenDirection instance = ...;
ScreenDirection result = instance.getOpposite();

net.minecraft.client.gui.navigation.ScreenDirection#isAfter(int,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenDirection.java:39
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ After

ทำงานยังไง

เรียกต่อ: isPositive(). คืนค่า: this.isPositive() ? i > j : j > i.

Parameters

  • int i
  • int j

ตัวอย่างใช้งาน

ScreenDirection instance = ...;
boolean result = instance.isAfter(0, 0);

net.minecraft.client.gui.navigation.ScreenDirection#isBefore(int,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenDirection.java:43
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Before

ทำงานยังไง

เรียกต่อ: isPositive(). คืนค่า: this.isPositive() ? i < j : j < i.

Parameters

  • int i
  • int j

ตัวอย่างใช้งาน

ScreenDirection instance = ...;
boolean result = instance.isBefore(0, 0);

net.minecraft.client.gui.navigation.ScreenDirection#isPositive()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenDirection.java:32
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Positive

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (this) { case UP, LEFT -> false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenDirection instance = ...;
boolean result = instance.isPositive();

ScreenPosition

  • Full name: net.minecraft.client.gui.navigation.ScreenPosition
  • Package: net.minecraft.client.gui.navigation
  • Source: clientOnlynet/minecraft/client/gui/navigation/ScreenPosition.java
  • Type: record
  • Modifiers: public

net.minecraft.client.gui.navigation.ScreenPosition#getCoordinate(ScreenAxis)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenPosition.java:24
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Coordinate

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (screenAxis) { case HORIZONTAL -> this.x.

Parameters

  • ScreenAxis screenAxis

ตัวอย่างใช้งาน

ScreenPosition instance = ...;
ScreenAxis screenAxis = ...;
int result = instance.getCoordinate(screenAxis);

net.minecraft.client.gui.navigation.ScreenPosition#of(ScreenAxis,int,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenPosition.java:8
  • Modifiers: public static
  • Return: ScreenPosition

คืออะไร

ดำเนินการ of ตาม implementation ของ ScreenPosition

ทำงานยังไง

แยกกรณีด้วย switch. สร้างออบเจ็กต์: ScreenPosition. คืนค่า: switch (screenAxis) { case HORIZONTAL -> new ScreenPosition(i, j).

Parameters

  • ScreenAxis screenAxis
  • int i
  • int j

ตัวอย่างใช้งาน

ScreenAxis screenAxis = ...;
ScreenPosition result = ScreenPosition.of(screenAxis, 0, 0);

net.minecraft.client.gui.navigation.ScreenPosition#step(ScreenDirection)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenPosition.java:15
  • Modifiers: public
  • Return: ScreenPosition

คืออะไร

ดำเนินการ step ตาม implementation ของ ScreenPosition

ทำงานยังไง

แยกกรณีด้วย switch. สร้างออบเจ็กต์: ScreenPosition. คืนค่า: switch (screenDirection) { case DOWN -> new ScreenPosition(this.x, this.y + 1).

Parameters

  • ScreenDirection screenDirection

ตัวอย่างใช้งาน

ScreenPosition instance = ...;
ScreenDirection screenDirection = ...;
ScreenPosition result = instance.step(screenDirection);

ScreenRectangle

  • Full name: net.minecraft.client.gui.navigation.ScreenRectangle
  • Package: net.minecraft.client.gui.navigation
  • Source: clientOnlynet/minecraft/client/gui/navigation/ScreenRectangle.java
  • Type: record
  • Modifiers: public

net.minecraft.client.gui.navigation.ScreenRectangle#bottom()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:83
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ bottom ตาม implementation ของ ScreenRectangle

ทำงานยังไง

เรียกต่อ: y(). คืนค่า: this.position.y() + this.height.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
int result = instance.bottom();

net.minecraft.client.gui.navigation.ScreenRectangle#containsPoint(int,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:95
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Point

ทำงานยังไง

เรียกต่อ: left(), right(), top(), bottom(). คืนค่า: i >= this.left() && i < this.right() && j >= this.top() && j < this.bottom().

Parameters

  • int i
  • int j

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
boolean result = instance.containsPoint(0, 0);

net.minecraft.client.gui.navigation.ScreenRectangle#empty()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:19
  • Modifiers: public static
  • Return: ScreenRectangle

คืออะไร

ดำเนินการ empty ตาม implementation ของ ScreenRectangle

ทำงานยังไง

คืนค่า: EMPTY.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenRectangle result = ScreenRectangle.empty();

net.minecraft.client.gui.navigation.ScreenRectangle#getBorder(ScreenDirection)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:46
  • Modifiers: public
  • Return: ScreenRectangle

คืออะไร

อ่านค่า Border

ทำงานยังไง

เรียกต่อ: getBoundInDirection(), getAxis(), orthogonal(), getNegative(), getLength(), of(), step(). คืนค่า: of(screenDirection.getAxis(), i, j, 1, k).step(screenDirection).

Parameters

  • ScreenDirection screenDirection

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenDirection screenDirection = ...;
ScreenRectangle result = instance.getBorder(screenDirection);

net.minecraft.client.gui.navigation.ScreenRectangle#getBoundInDirection(ScreenDirection)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:41
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Bound In Direction

ทำงานยังไง

เรียกต่อ: getAxis(), isPositive(), getCoordinate(), getLength(). คืนค่า: screenDirection.isPositive() ? this.position.getCoordinate(screenAxis) + this.getLength(screenAxis) - 1 : this.position.getCoordinate(screenAxis).

Parameters

  • ScreenDirection screenDirection

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenDirection screenDirection = ...;
int result = instance.getBoundInDirection(screenDirection);

net.minecraft.client.gui.navigation.ScreenRectangle#getCenterInAxis(ScreenAxis)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:66
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Center In Axis

ทำงานยังไง

เรียกต่อ: getBoundInDirection(), getPositive(), getNegative(). คืนค่า: (this.getBoundInDirection(screenAxis.getPositive()) + this.getBoundInDirection(screenAxis.getNegative())) / 2.

Parameters

  • ScreenAxis screenAxis

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenAxis screenAxis = ...;
int result = instance.getCenterInAxis(screenAxis);

net.minecraft.client.gui.navigation.ScreenRectangle#getLength(ScreenAxis)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:34
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Length

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (screenAxis) { case HORIZONTAL -> this.width.

Parameters

  • ScreenAxis screenAxis

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenAxis screenAxis = ...;
int result = instance.getLength(screenAxis);

net.minecraft.client.gui.navigation.ScreenRectangle#intersection(ScreenRectangle)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:70
  • Modifiers: public
  • Return: ScreenRectangle

คืออะไร

ดำเนินการ intersection ตาม implementation ของ ScreenRectangle

ทำงานยังไง

เรียกต่อ: max(), left(), top(), min(), right(), bottom(). สร้างออบเจ็กต์: ScreenRectangle. คืนค่า: i < k && j < l ? new ScreenRectangle(i, j, k - i, l - j) : null.

Parameters

  • ScreenRectangle screenRectangle

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenRectangle screenRectangle = ...;
ScreenRectangle result = instance.intersection(screenRectangle);

net.minecraft.client.gui.navigation.ScreenRectangle#left()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:87
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ left ตาม implementation ของ ScreenRectangle

ทำงานยังไง

เรียกต่อ: x(). คืนค่า: this.position.x().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
int result = instance.left();

net.minecraft.client.gui.navigation.ScreenRectangle#of(ScreenAxis,int,int,int,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:23
  • Modifiers: public static
  • Return: ScreenRectangle

คืออะไร

ดำเนินการ of ตาม implementation ของ ScreenRectangle

ทำงานยังไง

แยกกรณีด้วย switch. สร้างออบเจ็กต์: ScreenRectangle. คืนค่า: switch (screenAxis) { case HORIZONTAL -> new ScreenRectangle(i, j, k, l).

Parameters

  • ScreenAxis screenAxis
  • int i
  • int j
  • int k
  • int l

ตัวอย่างใช้งาน

ScreenAxis screenAxis = ...;
ScreenRectangle result = ScreenRectangle.of(screenAxis, 0, 0, 0, 0);

net.minecraft.client.gui.navigation.ScreenRectangle#overlaps(ScreenRectangle)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:54
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ overlaps ตาม implementation ของ ScreenRectangle

ทำงานยังไง

เรียกต่อ: overlapsInAxis(). คืนค่า: this.overlapsInAxis(screenRectangle, ScreenAxis.HORIZONTAL) && this.overlapsInAxis(screenRectangle, ScreenAxis.VERTICAL).

Parameters

  • ScreenRectangle screenRectangle

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenRectangle screenRectangle = ...;
boolean result = instance.overlaps(screenRectangle);

net.minecraft.client.gui.navigation.ScreenRectangle#overlapsInAxis(ScreenRectangle,ScreenAxis)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:58
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ overlapsInAxis ตาม implementation ของ ScreenRectangle

ทำงานยังไง

เรียกต่อ: getBoundInDirection(), getNegative(), getPositive(), max(), min(). คืนค่า: Math.max(i, j) <= Math.min(k, l).

Parameters

  • ScreenRectangle screenRectangle
  • ScreenAxis screenAxis

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenRectangle screenRectangle = ...;
ScreenAxis screenAxis = ...;
boolean result = instance.overlapsInAxis(screenRectangle, screenAxis);

net.minecraft.client.gui.navigation.ScreenRectangle#right()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:91
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ right ตาม implementation ของ ScreenRectangle

ทำงานยังไง

เรียกต่อ: x(). คืนค่า: this.position.x() + this.width.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
int result = instance.right();

net.minecraft.client.gui.navigation.ScreenRectangle#ScreenRectangle(int,int,int,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ScreenRectangle ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

สร้างออบเจ็กต์: ScreenPosition.

Parameters

  • int i
  • int j
  • int k
  • int l

ตัวอย่างใช้งาน

ScreenRectangle instance = new ScreenRectangle(0, 0, 0, 0);

net.minecraft.client.gui.navigation.ScreenRectangle#step(ScreenDirection)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:30
  • Modifiers: public
  • Return: ScreenRectangle

คืออะไร

ดำเนินการ step ตาม implementation ของ ScreenRectangle

ทำงานยังไง

สร้างออบเจ็กต์: ScreenRectangle. คืนค่า: new ScreenRectangle(this.position.step(screenDirection), this.width, this.height).

Parameters

  • ScreenDirection screenDirection

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
ScreenDirection screenDirection = ...;
ScreenRectangle result = instance.step(screenDirection);

net.minecraft.client.gui.navigation.ScreenRectangle#top()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:79
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ top ตาม implementation ของ ScreenRectangle

ทำงานยังไง

เรียกต่อ: y(). คืนค่า: this.position.y().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
int result = instance.top();

net.minecraft.client.gui.navigation.ScreenRectangle#transformAxisAligned(Matrix4f)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/navigation/ScreenRectangle.java:99
  • Modifiers: public
  • Return: ScreenRectangle

คืออะไร

แปลงรูป Axis Aligned

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isIdentity(), transformPosition(), left(), top(), right(), bottom(), floor(). สร้างออบเจ็กต์: Vector3f, ScreenRectangle. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Matrix4f matrix4f

ตัวอย่างใช้งาน

ScreenRectangle instance = ...;
Matrix4f matrix4f = ...;
ScreenRectangle result = instance.transformAxisAligned(matrix4f);