Skip to content

Package com.mojang.realmsclient.gui

Part 1/1


RealmsDataFetcher

  • Full name: com.mojang.realmsclient.gui.RealmsDataFetcher
  • Package: com.mojang.realmsclient.gui
  • Source: clientOnlycom/mojang/realmsclient/gui/RealmsDataFetcher.java
  • Type: class
  • Modifiers: public

com.mojang.realmsclient.gui.RealmsDataFetcher#getTasks()

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsDataFetcher.java:56
  • Modifiers: public
  • Return: List<DataFetcher.Task<?>>

คืออะไร

อ่านค่า Tasks

ทำงานยังไง

คืนค่า: this.tasks.

Parameters

  • ไม่มี

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

RealmsDataFetcher instance = ...;
List<DataFetcher.Task<?>> result = instance.getTasks();

com.mojang.realmsclient.gui.RealmsDataFetcher#RealmsDataFetcher(RealmsClient)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsDataFetcher.java:31
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: serverListUpdateTask, pendingInvitesTask, trialAvailabilityTask, newsTask, notificationsTask, onlinePlayersTask. เรียกต่อ: createTask(), listRealms(), isSnapshot(), ServerListData(), listSnapshotEligibleRealms(), of(), ofSeconds(), exponentialBackoff(). สร้างออบเจ็กต์: RealmsDataFetcher.ServerListData.

Parameters

  • RealmsClient realmsClient

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

RealmsClient realmsClient = ...;
RealmsDataFetcher instance = new RealmsDataFetcher(realmsClient);

RealmsNewsManager

  • Full name: com.mojang.realmsclient.gui.RealmsNewsManager
  • Package: com.mojang.realmsclient.gui
  • Source: clientOnlycom/mojang/realmsclient/gui/RealmsNewsManager.java
  • Type: class
  • Modifiers: public

com.mojang.realmsclient.gui.RealmsNewsManager#hasUnreadNews()

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsNewsManager.java:21
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Unread News

ทำงานยังไง

คืนค่า: this.hasUnreadNews.

Parameters

  • ไม่มี

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

RealmsNewsManager instance = ...;
boolean result = instance.hasUnreadNews();

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsNewsManager.java:25
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ newsLink ตาม implementation ของ RealmsNewsManager

ทำงานยังไง

คืนค่า: this.newsLink.

Parameters

  • ไม่มี

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

RealmsNewsManager instance = ...;
String result = instance.newsLink();

com.mojang.realmsclient.gui.RealmsNewsManager#RealmsNewsManager(RealmsPersistence)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsNewsManager.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: newsLocalStorage, hasUnreadNews, newsLink. เรียกต่อ: read().

Parameters

  • RealmsPersistence realmsPersistence

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

RealmsPersistence realmsPersistence = ...;
RealmsNewsManager instance = new RealmsNewsManager(realmsPersistence);

com.mojang.realmsclient.gui.RealmsNewsManager#updateUnreadNews(RealmsNews)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsNewsManager.java:29
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Unread News

ทำงานยังไง

แก้ state: hasUnreadNews, newsLink. เรียกต่อ: updateNewsStorage().

Parameters

  • RealmsNews realmsNews

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

RealmsNewsManager instance = ...;
RealmsNews realmsNews = ...;
instance.updateUnreadNews(realmsNews);

RealmsServerList

  • Full name: com.mojang.realmsclient.gui.RealmsServerList
  • Package: com.mojang.realmsclient.gui
  • Source: clientOnlycom/mojang/realmsclient/gui/RealmsServerList.java
  • Type: class
  • Modifiers: public
  • Implements: Iterable<RealmsServer>

com.mojang.realmsclient.gui.RealmsServerList#isEmpty()

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsServerList.java:44
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.servers.isEmpty().

Parameters

  • ไม่มี

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

RealmsServerList instance = ...;
boolean result = instance.isEmpty();

com.mojang.realmsclient.gui.RealmsServerList#iterator()

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsServerList.java:39
  • Modifiers: public
  • Return: Iterator<RealmsServer>

คืออะไร

ดำเนินการ iterator ตาม implementation ของ RealmsServerList

ทำงานยังไง

คืนค่า: this.servers.iterator().

Parameters

  • ไม่มี

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

RealmsServerList instance = ...;
Iterator<RealmsServer> result = instance.iterator();

com.mojang.realmsclient.gui.RealmsServerList#RealmsServerList(Minecraft)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsServerList.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: minecraft.

Parameters

  • Minecraft minecraft

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

Minecraft minecraft = ...;
RealmsServerList instance = new RealmsServerList(minecraft);

com.mojang.realmsclient.gui.RealmsServerList#removeItem(RealmsServer)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsServerList.java:34
  • Modifiers: public
  • Return: void

คืออะไร

ลบ Item

ทำงานยังไง

เรียกต่อ: remove(), add().

Parameters

  • RealmsServer realmsServer

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

RealmsServerList instance = ...;
RealmsServer realmsServer = ...;
instance.removeItem(realmsServer);

com.mojang.realmsclient.gui.RealmsServerList#updateServersList(List<RealmsServer>)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsServerList.java:23
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Servers List

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: servers. เรียกต่อ: sort(), McoServerComparator(), getUser(), getName(), removeAll(), clear(). สร้างออบเจ็กต์: ArrayList<>, RealmsServer.McoServerComparator.

Parameters

  • List<RealmsServer> list

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

RealmsServerList instance = ...;
List<RealmsServer> list = ...;
instance.updateServersList(list);

RealmsWorldSlotButton

  • Full name: com.mojang.realmsclient.gui.RealmsWorldSlotButton
  • Package: com.mojang.realmsclient.gui
  • Source: clientOnlycom/mojang/realmsclient/gui/RealmsWorldSlotButton.java
  • Type: class
  • Modifiers: public
  • Extends: Button

com.mojang.realmsclient.gui.RealmsWorldSlotButton#getState()

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsWorldSlotButton.java:45
  • Modifiers: public
  • Return: RealmsWorldSlotButton.State

คืออะไร

อ่านค่า State

ทำงานยังไง

คืนค่า: this.state.

Parameters

  • ไม่มี

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

RealmsWorldSlotButton instance = ...;
RealmsWorldSlotButton.State result = instance.getState();

com.mojang.realmsclient.gui.RealmsWorldSlotButton#RealmsWorldSlotButton(int,int,int,int,int,Button.OnPress)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsWorldSlotButton.java:40
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: slotIndex.

Parameters

  • int i
  • int j
  • int k
  • int l
  • int m
  • Button.OnPress onPress

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

Button.OnPress onPress = ...;
RealmsWorldSlotButton instance = new RealmsWorldSlotButton(0, 0, 0, 0, 0, onPress);

com.mojang.realmsclient.gui.RealmsWorldSlotButton#renderWidget(GuiGraphics,int,int,float)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsWorldSlotButton.java:81
  • Modifiers: public
  • Return: void

คืออะไร

เรนเดอร์ Widget

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: slotIndex. เรียกต่อ: getX(), getY(), isHoveredOrFocused(), worldTemplate(), valueOf(), colorFromFloat(), blit(), blitSprite().

Parameters

  • GuiGraphics guiGraphics
  • int i
  • int j
  • float f

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

RealmsWorldSlotButton instance = ...;
GuiGraphics guiGraphics = ...;
instance.renderWidget(guiGraphics, 0, 0, 0.0F);

com.mojang.realmsclient.gui.RealmsWorldSlotButton#setServerData(RealmsServer)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsWorldSlotButton.java:50
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Server Data

ทำงานยังไง

แก้ state: state. เรียกต่อ: State(), setTooltipAndNarration(). สร้างออบเจ็กต์: RealmsWorldSlotButton.State.

Parameters

  • RealmsServer realmsServer

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

RealmsWorldSlotButton instance = ...;
RealmsServer realmsServer = ...;
instance.setServerData(realmsServer);

RealmsWorldSlotButton$State

  • Full name: com.mojang.realmsclient.gui.RealmsWorldSlotButton$State
  • Package: com.mojang.realmsclient.gui
  • Source: clientOnlycom/mojang/realmsclient/gui/RealmsWorldSlotButton.java
  • Type: class
  • Modifiers: public static

com.mojang.realmsclient.gui.RealmsWorldSlotButton$State#State(RealmsServer,int)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RealmsWorldSlotButton.java:160
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: minigame, isCurrentlyActiveSlot, slotName, imageId, image, empty. เรียกต่อ: isMinigameActive(), getString(), get(), getSlotName(), getAction().

Parameters

  • RealmsServer realmsServer
  • int i

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

RealmsServer realmsServer = ...;
RealmsWorldSlotButton.State instance = new RealmsWorldSlotButton.State(realmsServer, 0);

RowButton

  • Full name: com.mojang.realmsclient.gui.RowButton
  • Package: com.mojang.realmsclient.gui
  • Source: clientOnlycom/mojang/realmsclient/gui/RowButton.java
  • Type: class
  • Modifiers: public abstract

com.mojang.realmsclient.gui.RowButton#draw(GuiGraphics,int,int,boolean)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:31
  • Modifiers: protected abstract
  • Return: void

คืออะไร

วาด draw

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • GuiGraphics guiGraphics
  • int i
  • int j
  • boolean bl

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

GuiGraphics guiGraphics = ...;
@Override
protected void draw(GuiGraphics guiGraphics, int i, int j, boolean bl) {
    super.draw(guiGraphics, i, j, bl);
}

com.mojang.realmsclient.gui.RowButton#drawButtonsInRow(GuiGraphics,List<RowButton>,AbstractSelectionList<?>,int,int,int,int)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:43
  • Modifiers: public static
  • Return: void

คืออะไร

วาด Buttons In Row

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getRowWidth(), getRight(), drawForRowAt().

Parameters

  • GuiGraphics guiGraphics
  • List<RowButton> list
  • AbstractSelectionList<?> abstractSelectionList
  • int i
  • int j
  • int k
  • int l

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

GuiGraphics guiGraphics = ...;
List<RowButton> list = ...;
AbstractSelectionList<?> abstractSelectionList = ...;
RowButton.drawButtonsInRow(guiGraphics, list, abstractSelectionList, 0, 0, 0, 0);

com.mojang.realmsclient.gui.RowButton#drawForRowAt(GuiGraphics,int,int,int,int)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:24
  • Modifiers: public
  • Return: void

คืออะไร

วาด For Row At

ทำงานยังไง

เรียกต่อ: draw().

Parameters

  • GuiGraphics guiGraphics
  • int i
  • int j
  • int k
  • int l

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

RowButton instance = ...;
GuiGraphics guiGraphics = ...;
instance.drawForRowAt(guiGraphics, 0, 0, 0, 0);

com.mojang.realmsclient.gui.RowButton#getBottom()

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:37
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Bottom

ทำงานยังไง

คืนค่า: this.yOffset + this.height.

Parameters

  • ไม่มี

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

RowButton instance = ...;
int result = instance.getBottom();

com.mojang.realmsclient.gui.RowButton#getRight()

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:33
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Right

ทำงานยังไง

คืนค่า: this.xOffset + this.width.

Parameters

  • ไม่มี

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

RowButton instance = ...;
int result = instance.getRight();

com.mojang.realmsclient.gui.RowButton#onClick(int)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:41
  • Modifiers: public abstract
  • Return: void

คืออะไร

จัดการเหตุการณ์ Click

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • int i

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

RowButton instance = ...;
instance.onClick(0);

com.mojang.realmsclient.gui.RowButton#RowButton(int,int,int,int)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: width, height, xOffset, yOffset.

Parameters

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

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

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

com.mojang.realmsclient.gui.RowButton#rowButtonMouseClicked(AbstractSelectionList<?>,ObjectSelectionList.Entry<?>,List<RowButton>,int,double,double)

  • Origin: clientOnly
  • Source: com/mojang/realmsclient/gui/RowButton.java:51
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ rowButtonMouseClicked ตาม implementation ของ RowButton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: children(), indexOf(), setSelectedIndex(), getRowLeft(), getRowTop(), getRight(), getBottom(), onClick().

Parameters

  • AbstractSelectionList<?> abstractSelectionList
  • ObjectSelectionList.Entry<?> entry
  • List<RowButton> list
  • int i
  • double d
  • double e

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

AbstractSelectionList<?> abstractSelectionList = ...;
ObjectSelectionList.Entry<?> entry = ...;
List<RowButton> list = ...;
RowButton.rowButtonMouseClicked(abstractSelectionList, entry, list, 0, 0.0D, 0.0D);