Skip to content

Package net.minecraft.network.chat

Part 1/1


ChatDecorator

  • Full name: net.minecraft.network.chat.ChatDecorator
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ChatDecorator.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.ChatDecorator#decorate(ServerPlayer,Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatDecorator.java:10
  • Modifiers: ``
  • Return: Component

คืออะไร

ดำเนินการ decorate ตาม implementation ของ ChatDecorator

ทำงานยังไง

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

Parameters

  • ServerPlayer serverPlayer
  • Component component

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

ChatDecorator instance = ...;
ServerPlayer serverPlayer = ...;
Component component = ...;
Component result = instance.decorate(serverPlayer, component);

ChatType

  • Full name: net.minecraft.network.chat.ChatType
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ChatType.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.ChatType#bind(ResourceKey<ChatType>,CommandSourceStack)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatType.java:69
  • Modifiers: public static
  • Return: ChatType.Bound

คืออะไร

ผูก bind

ทำงานยังไง

เรียกต่อ: registryAccess(), getDisplayName(). คืนค่า: bind(resourceKey, commandSourceStack.registryAccess(), commandSourceStack.getDisplayName()).

Parameters

  • ResourceKey<ChatType> resourceKey
  • CommandSourceStack commandSourceStack

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

ResourceKey<ChatType> resourceKey = ...;
CommandSourceStack commandSourceStack = ...;
ChatType.Bound result = ChatType.bind(resourceKey, commandSourceStack);

net.minecraft.network.chat.ChatType#bind(ResourceKey<ChatType>,Entity)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatType.java:65
  • Modifiers: public static
  • Return: ChatType.Bound

คืออะไร

ผูก bind

ทำงานยังไง

เรียกต่อ: level(), registryAccess(), getDisplayName(). คืนค่า: bind(resourceKey, entity.level().registryAccess(), entity.getDisplayName()).

Parameters

  • ResourceKey<ChatType> resourceKey
  • Entity entity

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

ResourceKey<ChatType> resourceKey = ...;
Entity entity = ...;
ChatType.Bound result = ChatType.bind(resourceKey, entity);

net.minecraft.network.chat.ChatType#bind(ResourceKey<ChatType>,RegistryAccess,Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatType.java:73
  • Modifiers: public static
  • Return: ChatType.Bound

คืออะไร

ผูก bind

ทำงานยังไง

เรียกต่อ: lookupOrThrow(), Bound(), getOrThrow(). สร้างออบเจ็กต์: ChatType.Bound. คืนค่า: new ChatType.Bound(registry.getOrThrow(resourceKey), component).

Parameters

  • ResourceKey<ChatType> resourceKey
  • RegistryAccess registryAccess
  • Component component

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

ResourceKey<ChatType> resourceKey = ...;
RegistryAccess registryAccess = ...;
Component component = ...;
ChatType.Bound result = ChatType.bind(resourceKey, registryAccess, component);

net.minecraft.network.chat.ChatType#bootstrap(BootstrapContext<ChatType>)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatType.java:43
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ bootstrap ตาม implementation ของ ChatType

ทำงานยังไง

เรียกต่อ: register(), withSender(), incomingDirectMessage(), outgoingDirectMessage(), teamMessage(). สร้างออบเจ็กต์: ChatType.

Parameters

  • BootstrapContext<ChatType> bootstrapContext

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

BootstrapContext<ChatType> bootstrapContext = ...;
ChatType.bootstrap(bootstrapContext);

ChatType$Bound

  • Full name: net.minecraft.network.chat.ChatType$Bound
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ChatType.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.ChatType$Bound#decorate(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatType.java:93
  • Modifiers: public
  • Return: Component

คืออะไร

ดำเนินการ decorate ตาม implementation ของ ChatType$Bound

ทำงานยังไง

เรียกต่อ: value(), chat(). คืนค่า: this.chatType.value().chat().decorate(component, this).

Parameters

  • Component component

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

ChatType.Bound instance = ...;
Component component = ...;
Component result = instance.decorate(component);

net.minecraft.network.chat.ChatType$Bound#decorateNarration(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatType.java:97
  • Modifiers: public
  • Return: Component

คืออะไร

ดำเนินการ decorateNarration ตาม implementation ของ ChatType$Bound

ทำงานยังไง

เรียกต่อ: value(), narration(), decorate(). คืนค่า: this.chatType.value().narration().decorate(component, this).

Parameters

  • Component component

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

ChatType.Bound instance = ...;
Component component = ...;
Component result = instance.decorateNarration(component);

net.minecraft.network.chat.ChatType$Bound#withTargetName(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatType.java:101
  • Modifiers: public
  • Return: ChatType.Bound

คืออะไร

ดำเนินการ withTargetName ตาม implementation ของ ChatType$Bound

ทำงานยังไง

เรียกต่อ: Bound(), of(). สร้างออบเจ็กต์: ChatType.Bound. คืนค่า: new ChatType.Bound(this.chatType, this.name, Optional.of(component)).

Parameters

  • Component component

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

ChatType.Bound instance = ...;
Component component = ...;
ChatType.Bound result = instance.withTargetName(component);

ChatTypeDecoration

  • Full name: net.minecraft.network.chat.ChatTypeDecoration
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ChatTypeDecoration.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.ChatTypeDecoration#decorate(Component,ChatType.Bound)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:54
  • Modifiers: public
  • Return: Component

คืออะไร

ดำเนินการ decorate ตาม implementation ของ ChatTypeDecoration

ทำงานยังไง

เรียกต่อ: resolveParameters(), translatable(), withStyle(). คืนค่า: Component.translatable(this.translationKey, objects).withStyle(this.style).

Parameters

  • Component component
  • ChatType.Bound bound

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

ChatTypeDecoration instance = ...;
Component component = ...;
ChatType.Bound bound = ...;
Component result = instance.decorate(component, bound);

net.minecraft.network.chat.ChatTypeDecoration#incomingDirectMessage(String)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:38
  • Modifiers: public static
  • Return: ChatTypeDecoration

คืออะไร

ดำเนินการ incomingDirectMessage ตาม implementation ของ ChatTypeDecoration

ทำงานยังไง

เรียกต่อ: withColor(), withItalic(), of(). สร้างออบเจ็กต์: ChatTypeDecoration. คืนค่า: new ChatTypeDecoration(string, List.of(ChatTypeDecoration.Parameter.SENDER, ChatTypeDecoration.Parameter.CONTENT), style).

Parameters

  • String string

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

ChatTypeDecoration result = ChatTypeDecoration.incomingDirectMessage("value");

net.minecraft.network.chat.ChatTypeDecoration#outgoingDirectMessage(String)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:43
  • Modifiers: public static
  • Return: ChatTypeDecoration

คืออะไร

ดำเนินการ outgoingDirectMessage ตาม implementation ของ ChatTypeDecoration

ทำงานยังไง

เรียกต่อ: withColor(), withItalic(), of(). สร้างออบเจ็กต์: ChatTypeDecoration. คืนค่า: new ChatTypeDecoration(string, List.of(ChatTypeDecoration.Parameter.TARGET, ChatTypeDecoration.Parameter.CONTENT), style).

Parameters

  • String string

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

ChatTypeDecoration result = ChatTypeDecoration.outgoingDirectMessage("value");

net.minecraft.network.chat.ChatTypeDecoration#teamMessage(String)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:48
  • Modifiers: public static
  • Return: ChatTypeDecoration

คืออะไร

ดำเนินการ teamMessage ตาม implementation ของ ChatTypeDecoration

ทำงานยังไง

เรียกต่อ: of(). สร้างออบเจ็กต์: ChatTypeDecoration.

Parameters

  • String string

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

ChatTypeDecoration result = ChatTypeDecoration.teamMessage("value");

net.minecraft.network.chat.ChatTypeDecoration#withSender(String)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:34
  • Modifiers: public static
  • Return: ChatTypeDecoration

คืออะไร

ดำเนินการ withSender ตาม implementation ของ ChatTypeDecoration

ทำงานยังไง

เรียกต่อ: of(). สร้างออบเจ็กต์: ChatTypeDecoration. คืนค่า: new ChatTypeDecoration(string, List.of(ChatTypeDecoration.Parameter.SENDER, ChatTypeDecoration.Parameter.CONTENT), Style.EMPTY).

Parameters

  • String string

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

ChatTypeDecoration result = ChatTypeDecoration.withSender("value");

ChatTypeDecoration$Parameter

  • Full name: net.minecraft.network.chat.ChatTypeDecoration$Parameter
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ChatTypeDecoration.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.network.chat.ChatTypeDecoration$Parameter#getSerializedName()

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:94
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

ChatTypeDecoration.Parameter instance = ...;
String result = instance.getSerializedName();

net.minecraft.network.chat.ChatTypeDecoration$Parameter#select(Component,ChatType.Bound)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:90
  • Modifiers: public
  • Return: Component

คืออะไร

ดำเนินการ select ตาม implementation ของ ChatTypeDecoration$Parameter

ทำงานยังไง

คืนค่า: this.selector.select(component, bound).

Parameters

  • Component component
  • ChatType.Bound bound

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

ChatTypeDecoration.Parameter instance = ...;
Component component = ...;
ChatType.Bound bound = ...;
Component result = instance.select(component, bound);

ChatTypeDecoration$Parameter$Selector

  • Full name: net.minecraft.network.chat.ChatTypeDecoration$Parameter$Selector
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ChatTypeDecoration.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.ChatTypeDecoration$Parameter$Selector#select(Component,ChatType.Bound)

  • Origin: common
  • Source: net/minecraft/network/chat/ChatTypeDecoration.java:100
  • Modifiers: ``
  • Return: Component

คืออะไร

ดำเนินการ select ตาม implementation ของ ChatTypeDecoration$Parameter$Selector

ทำงานยังไง

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

Parameters

  • Component component
  • ChatType.Bound bound

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

ChatTypeDecoration.Parameter.Selector instance = ...;
Component component = ...;
ChatType.Bound bound = ...;
Component result = instance.select(component, bound);

ClickEvent

  • Full name: net.minecraft.network.chat.ClickEvent
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ClickEvent.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.ClickEvent#ClickEvent(ClickEvent.Action,String)

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: action, value.

Parameters

  • ClickEvent.Action action
  • String string

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

ClickEvent.Action action = ...;
ClickEvent instance = new ClickEvent(action, "value");

net.minecraft.network.chat.ClickEvent#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:33
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: action. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Object object

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

ClickEvent instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.ClickEvent#getAction()

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:25
  • Modifiers: public
  • Return: ClickEvent.Action

คืออะไร

อ่านค่า Action

ทำงานยังไง

คืนค่า: this.action.

Parameters

  • ไม่มี

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

ClickEvent instance = ...;
ClickEvent.Action result = instance.getAction();

net.minecraft.network.chat.ClickEvent#getValue()

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:29
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Value

ทำงานยังไง

คืนค่า: this.value.

Parameters

  • ไม่มี

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

ClickEvent instance = ...;
String result = instance.getValue();

net.minecraft.network.chat.ClickEvent#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:50
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ ClickEvent

ทำงานยังไง

คืนค่า: 31 * i + this.value.hashCode().

Parameters

  • ไม่มี

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

ClickEvent instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.ClickEvent#toString()

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:45
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ ClickEvent

ทำงานยังไง

คืนค่า: "ClickEvent{action=" + this.action + ", value='" + this.value + "'}".

Parameters

  • ไม่มี

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

ClickEvent instance = ...;
String result = instance.toString();

ClickEvent$Action

  • Full name: net.minecraft.network.chat.ClickEvent$Action
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ClickEvent.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.network.chat.ClickEvent$Action#filterForSerialization(ClickEvent.Action)

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:83
  • Modifiers: public static
  • Return: DataResult<ClickEvent.Action>

คืออะไร

ดำเนินการ filterForSerialization ตาม implementation ของ ClickEvent$Action

ทำงานยังไง

เรียกต่อ: isAllowedFromServer(), error(), success(), stable(). คืนค่า: !action.isAllowedFromServer() ? DataResult.error(() -> "Action not allowed: " + action) : DataResult.success(action, Lifecycle.stable()).

Parameters

  • ClickEvent.Action action

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

ClickEvent.Action action = ...;
DataResult<ClickEvent.Action> result = ClickEvent.Action.filterForSerialization(action);

net.minecraft.network.chat.ClickEvent$Action#getSerializedName()

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:78
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

ClickEvent.Action instance = ...;
String result = instance.getSerializedName();

net.minecraft.network.chat.ClickEvent$Action#isAllowedFromServer()

  • Origin: common
  • Source: net/minecraft/network/chat/ClickEvent.java:74
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Allowed From Server

ทำงานยังไง

คืนค่า: this.allowFromServer.

Parameters

  • ไม่มี

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

ClickEvent.Action instance = ...;
boolean result = instance.isAllowedFromServer();

CommonComponents

  • Full name: net.minecraft.network.chat.CommonComponents
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/CommonComponents.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.CommonComponents#days(long)

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:34
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ days ตาม implementation ของ CommonComponents

ทำงานยังไง

เรียกต่อ: translatable(). คืนค่า: Component.translatable("gui.days", l).

Parameters

  • long l

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

MutableComponent result = CommonComponents.days(0L);

net.minecraft.network.chat.CommonComponents#hours(long)

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:38
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ hours ตาม implementation ของ CommonComponents

ทำงานยังไง

เรียกต่อ: translatable(). คืนค่า: Component.translatable("gui.hours", l).

Parameters

  • long l

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

MutableComponent result = CommonComponents.hours(0L);

net.minecraft.network.chat.CommonComponents#joinForNarration(Component[])

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:58
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

รวม/เข้าร่วม For Narration

ทำงานยังไง

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

Parameters

  • Component[] components

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

Component[] components = ...;
MutableComponent result = CommonComponents.joinForNarration(components);

net.minecraft.network.chat.CommonComponents#joinLines(Collection<? extends Component>)

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:75
  • Modifiers: public static
  • Return: Component

คืออะไร

รวม/เข้าร่วม Lines

ทำงานยังไง

เรียกต่อ: formatList(). คืนค่า: ComponentUtils.formatList(collection, NEW_LINE).

Parameters

  • Collection<? extends Component> collection

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

Collection<? extends Component> collection = ...;
Component result = CommonComponents.joinLines(collection);

net.minecraft.network.chat.CommonComponents#joinLines(Component[])

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:71
  • Modifiers: public static
  • Return: Component

คืออะไร

รวม/เข้าร่วม Lines

ทำงานยังไง

เรียกต่อ: asList(). คืนค่า: joinLines(Arrays.asList(components)).

Parameters

  • Component[] components

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

Component[] components = ...;
Component result = CommonComponents.joinLines(components);

net.minecraft.network.chat.CommonComponents#minutes(long)

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:42
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ minutes ตาม implementation ของ CommonComponents

ทำงานยังไง

เรียกต่อ: translatable(). คืนค่า: Component.translatable("gui.minutes", l).

Parameters

  • long l

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

MutableComponent result = CommonComponents.minutes(0L);

net.minecraft.network.chat.CommonComponents#optionNameValue(Component,Component)

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:54
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ optionNameValue ตาม implementation ของ CommonComponents

ทำงานยังไง

เรียกต่อ: translatable(). คืนค่า: Component.translatable("options.generic_value", component, component2).

Parameters

  • Component component
  • Component component2

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

Component component = ...;
Component component2 = ...;
MutableComponent result = CommonComponents.optionNameValue(component, component2);

net.minecraft.network.chat.CommonComponents#optionStatus(boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:46
  • Modifiers: public static
  • Return: Component

คืออะไร

ดำเนินการ optionStatus ตาม implementation ของ CommonComponents

ทำงานยังไง

คืนค่า: bl ? OPTION_ON : OPTION_OFF.

Parameters

  • boolean bl

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

Component result = CommonComponents.optionStatus(true);

net.minecraft.network.chat.CommonComponents#optionStatus(Component,boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:50
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ optionStatus ตาม implementation ของ CommonComponents

ทำงานยังไง

เรียกต่อ: translatable(). คืนค่า: Component.translatable(bl ? "options.on.composed" : "options.off.composed", component).

Parameters

  • Component component
  • boolean bl

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

Component component = ...;
MutableComponent result = CommonComponents.optionStatus(component, true);

net.minecraft.network.chat.CommonComponents#space()

  • Origin: common
  • Source: net/minecraft/network/chat/CommonComponents.java:30
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ space ตาม implementation ของ CommonComponents

ทำงานยังไง

เรียกต่อ: literal(). คืนค่า: Component.literal(" ").

Parameters

  • ไม่มี

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

MutableComponent result = CommonComponents.space();

Component

  • Full name: net.minecraft.network.chat.Component
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/Component.java
  • Type: interface
  • Modifiers: public
  • Implements: Message,FormattedText

net.minecraft.network.chat.Component#contains(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:134
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), toFlatList(), getStyle(), indexOfSubList(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Component component

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

Component instance = ...;
Component component = ...;
boolean result = instance.contains(component);

net.minecraft.network.chat.Component#copy()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:77
  • Modifiers: default
  • Return: MutableComponent

คืออะไร

คัดลอก copy

ทำงานยังไง

เรียกต่อ: getContents(), getSiblings(), getStyle(). สร้างออบเจ็กต์: MutableComponent, ArrayList<>. คืนค่า: new MutableComponent(this.getContents(), new ArrayList<>(this.getSiblings()), this.getStyle()).

Parameters

  • ไม่มี

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

Component instance = ...;
MutableComponent result = instance.copy();

net.minecraft.network.chat.Component#empty()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:179
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

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

ทำงานยังไง

เรียกต่อ: create(). คืนค่า: MutableComponent.create(PlainTextContents.EMPTY).

Parameters

  • ไม่มี

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

MutableComponent result = Component.empty();

net.minecraft.network.chat.Component#getContents()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:43
  • Modifiers: ``
  • Return: ComponentContents

คืออะไร

อ่านค่า Contents

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Component instance = ...;
ComponentContents result = instance.getContents();

net.minecraft.network.chat.Component#getSiblings()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:64
  • Modifiers: ``
  • Return: List<Component>

คืออะไร

อ่านค่า Siblings

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Component instance = ...;
List<Component> result = instance.getSiblings();

net.minecraft.network.chat.Component#getString()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:45
  • Modifiers: default
  • Return: String

คืออะไร

อ่านค่า String

ทำงานยังไง

คืนค่า: FormattedText.super.getString().

Parameters

  • ไม่มี

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

Component instance = ...;
String result = instance.getString();

net.minecraft.network.chat.Component#getString(int)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:50
  • Modifiers: default
  • Return: String

คืออะไร

อ่านค่า String

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: visit(), length(), append(), substring(), empty(), toString(). สร้างออบเจ็กต์: StringBuilder. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • int i

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

Component instance = ...;
String result = instance.getString(0);

net.minecraft.network.chat.Component#getStyle()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:41
  • Modifiers: ``
  • Return: Style

คืออะไร

อ่านค่า Style

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Component instance = ...;
Style result = instance.getStyle();

net.minecraft.network.chat.Component#getVisualOrderText()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:81
  • Modifiers: ``
  • Return: FormattedCharSequence

คืออะไร

อ่านค่า Visual Order Text

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Component instance = ...;
FormattedCharSequence result = instance.getVisualOrderText();

net.minecraft.network.chat.Component#keybind(String)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:183
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ keybind ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). สร้างออบเจ็กต์: KeybindContents. คืนค่า: MutableComponent.create(new KeybindContents(string)).

Parameters

  • String string

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

MutableComponent result = Component.keybind("value");

net.minecraft.network.chat.Component#literal(String)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:148
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ literal ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). คืนค่า: MutableComponent.create(PlainTextContents.create(string)).

Parameters

  • String string

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

MutableComponent result = Component.literal("value");

net.minecraft.network.chat.Component#nbt(String,boolean,Optional<Component>,DataSource)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:187
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ nbt ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). สร้างออบเจ็กต์: NbtContents. คืนค่า: MutableComponent.create(new NbtContents(string, bl, optional, dataSource)).

Parameters

  • String string
  • boolean bl
  • Optional<Component> optional
  • DataSource dataSource

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

Optional<Component> optional = ...;
DataSource dataSource = ...;
MutableComponent result = Component.nbt("value", true, optional, dataSource);

net.minecraft.network.chat.Component#nullToEmpty(String)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:144
  • Modifiers: static
  • Return: Component

คืออะไร

ดำเนินการ nullToEmpty ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: literal(). คืนค่า: string != null ? literal(string) : CommonComponents.EMPTY.

Parameters

  • String string

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

Component result = Component.nullToEmpty("value");

net.minecraft.network.chat.Component#plainCopy()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:73
  • Modifiers: default
  • Return: MutableComponent

คืออะไร

ดำเนินการ plainCopy ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(), getContents(). คืนค่า: MutableComponent.create(this.getContents()).

Parameters

  • ไม่มี

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

Component instance = ...;
MutableComponent result = instance.plainCopy();

net.minecraft.network.chat.Component#score(SelectorPattern,String)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:191
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ score ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(), left(). สร้างออบเจ็กต์: ScoreContents. คืนค่า: MutableComponent.create(new ScoreContents(Either.left(selectorPattern), string)).

Parameters

  • SelectorPattern selectorPattern
  • String string

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

SelectorPattern selectorPattern = ...;
MutableComponent result = Component.score(selectorPattern, "value");

net.minecraft.network.chat.Component#score(String,String)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:195
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ score ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(), right(). สร้างออบเจ็กต์: ScoreContents. คืนค่า: MutableComponent.create(new ScoreContents(Either.right(string), string2)).

Parameters

  • String string
  • String string2

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

MutableComponent result = Component.score("value", "value");

net.minecraft.network.chat.Component#selector(SelectorPattern,Optional<Component>)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:199
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ selector ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). สร้างออบเจ็กต์: SelectorContents. คืนค่า: MutableComponent.create(new SelectorContents(selectorPattern, optional)).

Parameters

  • SelectorPattern selectorPattern
  • Optional<Component> optional

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

SelectorPattern selectorPattern = ...;
Optional<Component> optional = ...;
MutableComponent result = Component.selector(selectorPattern, optional);

net.minecraft.network.chat.Component#toFlatList()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:118
  • Modifiers: default
  • Return: List<Component>

คืออะไร

ดำเนินการ toFlatList ตาม implementation ของ Component

ทำงานยังไง

คืนค่า: this.toFlatList(Style.EMPTY).

Parameters

  • ไม่มี

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

Component instance = ...;
List<Component> result = instance.toFlatList();

net.minecraft.network.chat.Component#toFlatList(Style)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:122
  • Modifiers: default
  • Return: List<Component>

คืออะไร

ดำเนินการ toFlatList ตาม implementation ของ Component

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: newArrayList(), visit(), isEmpty(), add(), literal(), withStyle(), empty(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Style style

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

Component instance = ...;
Style style = ...;
List<Component> result = instance.toFlatList(style);

net.minecraft.network.chat.Component#translatable(String)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:152
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ translatable ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). สร้างออบเจ็กต์: TranslatableContents. คืนค่า: MutableComponent.create(new TranslatableContents(string, null, TranslatableContents.NO_ARGS)).

Parameters

  • String string

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

MutableComponent result = Component.translatable("value");

net.minecraft.network.chat.Component#translatable(String,Object[])

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:156
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ translatable ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). สร้างออบเจ็กต์: TranslatableContents. คืนค่า: MutableComponent.create(new TranslatableContents(string, null, objects)).

Parameters

  • String string
  • Object[] objects

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

Object[] objects = ...;
MutableComponent result = Component.translatable("value", objects);

net.minecraft.network.chat.Component#translatableEscape(String,Object[])

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:160
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ translatableEscape ตาม implementation ของ Component

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isAllowedPrimitiveArgument(), valueOf(), translatable(). คืนค่า: translatable(string, objects).

Parameters

  • String string
  • Object[] objects

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

Object[] objects = ...;
MutableComponent result = Component.translatableEscape("value", objects);

net.minecraft.network.chat.Component#translatableWithFallback(String,String)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:171
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ translatableWithFallback ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). สร้างออบเจ็กต์: TranslatableContents. คืนค่า: MutableComponent.create(new TranslatableContents(string, string2, TranslatableContents.NO_ARGS)).

Parameters

  • String string
  • String string2

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

MutableComponent result = Component.translatableWithFallback("value", "value");

net.minecraft.network.chat.Component#translatableWithFallback(String,String,Object[])

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:175
  • Modifiers: static
  • Return: MutableComponent

คืออะไร

ดำเนินการ translatableWithFallback ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: create(). สร้างออบเจ็กต์: TranslatableContents. คืนค่า: MutableComponent.create(new TranslatableContents(string, string2, objects)).

Parameters

  • String string
  • String string2
  • Object[] objects

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

Object[] objects = ...;
MutableComponent result = Component.translatableWithFallback("value", "value", objects);

net.minecraft.network.chat.Component#translationArg(ChunkPos)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:219
  • Modifiers: static
  • Return: Component

คืออะไร

ดำเนินการ translationArg ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: literal(), toString(). คืนค่า: literal(chunkPos.toString()).

Parameters

  • ChunkPos chunkPos

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

ChunkPos chunkPos = ...;
Component result = Component.translationArg(chunkPos);

net.minecraft.network.chat.Component#translationArg(Date)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:203
  • Modifiers: static
  • Return: Component

คืออะไร

ดำเนินการ translationArg ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: literal(), toString(). คืนค่า: literal(date.toString()).

Parameters

  • Date date

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

Date date = ...;
Component result = Component.translationArg(date);

net.minecraft.network.chat.Component#translationArg(Message)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:207
  • Modifiers: static
  • Return: Component

คืออะไร

ดำเนินการ translationArg ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: literal(), getString(). คืนค่า: message instanceof Component component ? component : literal(message.getString()).

Parameters

  • Message message

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

Message message = ...;
Component result = Component.translationArg(message);

net.minecraft.network.chat.Component#translationArg(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:215
  • Modifiers: static
  • Return: Component

คืออะไร

ดำเนินการ translationArg ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: literal(), toString(). คืนค่า: literal(resourceLocation.toString()).

Parameters

  • ResourceLocation resourceLocation

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

ResourceLocation resourceLocation = ...;
Component result = Component.translationArg(resourceLocation);

net.minecraft.network.chat.Component#translationArg(URI)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:223
  • Modifiers: static
  • Return: Component

คืออะไร

ดำเนินการ translationArg ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: literal(), toString(). คืนค่า: literal(uRI.toString()).

Parameters

  • URI uRI

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

URI uRI = ...;
Component result = Component.translationArg(uRI);

net.minecraft.network.chat.Component#translationArg(UUID)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:211
  • Modifiers: static
  • Return: Component

คืออะไร

ดำเนินการ translationArg ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: literal(), toString(). คืนค่า: literal(uUID.toString()).

Parameters

  • UUID uUID

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

UUID uUID = ...;
Component result = Component.translationArg(uUID);

net.minecraft.network.chat.Component#tryCollapseToString()

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:66
  • Modifiers: default
  • Return: String

คืออะไร

ดำเนินการ tryCollapseToString ตาม implementation ของ Component

ทำงานยังไง

เรียกต่อ: getContents(), getSiblings(), isEmpty(), getStyle(), text().

Parameters

  • ไม่มี

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

Component instance = ...;
String result = instance.tryCollapseToString();

net.minecraft.network.chat.Component#visit(FormattedText.ContentConsumer<T>)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:101
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

เยี่ยมชม node visit

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getContents(), isPresent(), getSiblings(), empty(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • FormattedText.ContentConsumer<T> contentConsumer

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

Component instance = ...;
FormattedText.ContentConsumer<T> contentConsumer = ...;
Optional<T> result = instance.visit(contentConsumer);

net.minecraft.network.chat.Component#visit(FormattedText.StyledContentConsumer<T>,Style)

  • Origin: common
  • Source: net/minecraft/network/chat/Component.java:83
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

เยี่ยมชม node visit

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getStyle(), applyTo(), getContents(), isPresent(), getSiblings(), empty(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • FormattedText.StyledContentConsumer<T> styledContentConsumer
  • Style style

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

Component instance = ...;
FormattedText.StyledContentConsumer<T> styledContentConsumer = ...;
Style style = ...;
Optional<T> result = instance.visit(styledContentConsumer, style);

ComponentContents

  • Full name: net.minecraft.network.chat.ComponentContents
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ComponentContents.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.ComponentContents#resolve(CommandSourceStack,Entity,int)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentContents.java:20
  • Modifiers: default
  • Return: MutableComponent

คืออะไร

ดำเนินการ resolve ตาม implementation ของ ComponentContents

ทำงานยังไง

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

Parameters

  • CommandSourceStack commandSourceStack
  • Entity entity
  • int i

Throws

  • CommandSyntaxException

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

ComponentContents instance = ...;
CommandSourceStack commandSourceStack = ...;
Entity entity = ...;
MutableComponent result = instance.resolve(commandSourceStack, entity, 0);

net.minecraft.network.chat.ComponentContents#type()

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentContents.java:24
  • Modifiers: ``
  • Return: ComponentContents.Type<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ ComponentContents

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ComponentContents instance = ...;
ComponentContents.Type<?> result = instance.type();

net.minecraft.network.chat.ComponentContents#visit(FormattedText.ContentConsumer<T>)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentContents.java:16
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

เยี่ยมชม node visit

ทำงานยังไง

เรียกต่อ: empty(). คืนค่า: Optional.empty().

Parameters

  • FormattedText.ContentConsumer<T> contentConsumer

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

ComponentContents instance = ...;
FormattedText.ContentConsumer<T> contentConsumer = ...;
Optional<T> result = instance.visit(contentConsumer);

net.minecraft.network.chat.ComponentContents#visit(FormattedText.StyledContentConsumer<T>,Style)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentContents.java:12
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

เยี่ยมชม node visit

ทำงานยังไง

เรียกต่อ: empty(). คืนค่า: Optional.empty().

Parameters

  • FormattedText.StyledContentConsumer<T> styledContentConsumer
  • Style style

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

ComponentContents instance = ...;
FormattedText.StyledContentConsumer<T> styledContentConsumer = ...;
Style style = ...;
Optional<T> result = instance.visit(styledContentConsumer, style);

ComponentSerialization

  • Full name: net.minecraft.network.chat.ComponentSerialization
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ComponentSerialization.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.ComponentSerialization#createLegacyComponentMatcher(T[],Function<T, MapCodec<? extends E>>,Function<E, T>,String)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentSerialization.java:92
  • Modifiers: public static
  • Return: MapCodec<E>

คืออะไร

สร้าง Legacy Component Matcher

ทำงานยังไง

เรียกต่อ: of(), map(), toList(), apply(), fromValues(), dispatchMap(), orCompressed(). สร้างออบเจ็กต์: ComponentSerialization.FuzzyCodec<>, ComponentSerialization.StrictEither<>. คืนค่า: ExtraCodecs.orCompressed(mapCodec3, mapCodec2).

Parameters

  • T[] stringRepresentables
  • Function<T, MapCodec<? extends E>> function
  • Function<E, T> function2
  • String string

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

T[] stringRepresentables = ...;
Function<T, MapCodec<? extends E>> function = ...;
Function<E, T> function2 = ...;
MapCodec<E> result = ComponentSerialization.createLegacyComponentMatcher(stringRepresentables, function, function2, "value");

net.minecraft.network.chat.ComponentSerialization#flatCodec(int)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentSerialization.java:49
  • Modifiers: public static
  • Return: Codec<Component>

คืออะไร

ดำเนินการ flatCodec ตาม implementation ของ ComponentSerialization

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: string(), decode(), asJsonOps(), flatMap(), parseString(), getFirst(), parse(), map(). สร้างออบเจ็กต์: Codec<Component>. มีจุด return อย่างน้อย 6 จุด.

Parameters

  • int i

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

Codec<Component> result = ComponentSerialization.flatCodec(0);

ComponentUtils

  • Full name: net.minecraft.network.chat.ComponentUtils
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ComponentUtils.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.ComponentUtils#copyOnClickText(String)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:141
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

คัดลอก On Click Text

ทำงานยังไง

เรียกต่อ: wrapInSquareBrackets(), literal(), withStyle(), withColor(), withClickEvent(), withHoverEvent(), translatable(), withInsertion(). สร้างออบเจ็กต์: ClickEvent, HoverEvent.

Parameters

  • String string

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

MutableComponent result = ComponentUtils.copyOnClickText("value");

net.minecraft.network.chat.ComponentUtils#formatAndSortList(Collection<T>,Function<T, Component>)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:73
  • Modifiers: public static
  • Return: Component

คืออะไร

ดำเนินการ formatAndSortList ตาม implementation ของ ComponentUtils

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), size(), apply(), iterator(), next(), newArrayList(), sort(), formatList(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Collection<T> collection
  • Function<T, Component> function

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

Collection<T> collection = ...;
Function<T, Component> function = ...;
Component result = ComponentUtils.formatAndSortList(collection, function);

net.minecraft.network.chat.ComponentUtils#formatList(Collection<? extends Component>,Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:95
  • Modifiers: public static
  • Return: Component

คืออะไร

ดำเนินการ formatList ตาม implementation ของ ComponentUtils

ทำงานยังไง

เรียกต่อ: identity(). คืนค่า: formatList(collection, component, Function.identity()).

Parameters

  • Collection<? extends Component> collection
  • Component component

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

Collection<? extends Component> collection = ...;
Component component = ...;
Component result = ComponentUtils.formatList(collection, component);

net.minecraft.network.chat.ComponentUtils#formatList(Collection<? extends T>,Component,Function<T, Component>)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:99
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ formatList ตาม implementation ของ ComponentUtils

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), empty(), size(), apply(), iterator(), next(), copy(), append(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Collection<? extends T> collection
  • Component component
  • Function<T, Component> function

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

Collection<? extends T> collection = ...;
Component component = ...;
Function<T, Component> function = ...;
MutableComponent result = ComponentUtils.formatList(collection, component, function);

net.minecraft.network.chat.ComponentUtils#formatList(Collection<? extends T>,Function<T, Component>)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:87
  • Modifiers: public static
  • Return: Component

คืออะไร

ดำเนินการ formatList ตาม implementation ของ ComponentUtils

ทำงานยังไง

คืนค่า: formatList(collection, DEFAULT_SEPARATOR, function).

Parameters

  • Collection<? extends T> collection
  • Function<T, Component> function

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

Collection<? extends T> collection = ...;
Function<T, Component> function = ...;
Component result = ComponentUtils.formatList(collection, function);

net.minecraft.network.chat.ComponentUtils#formatList(Collection<? extends T>,Optional<? extends Component>,Function<T, Component>)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:91
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ formatList ตาม implementation ของ ComponentUtils

ทำงานยังไง

เรียกต่อ: orElse(). คืนค่า: formatList(collection, DataFixUtils.orElse(optional, DEFAULT_SEPARATOR), function).

Parameters

  • Collection<? extends T> collection
  • Optional<? extends Component> optional
  • Function<T, Component> function

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

Collection<? extends T> collection = ...;
Optional<? extends Component> optional = ...;
Function<T, Component> function = ...;
MutableComponent result = ComponentUtils.formatList(collection, optional, function);

net.minecraft.network.chat.ComponentUtils#formatList(Collection<String>)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:69
  • Modifiers: public static
  • Return: Component

คืออะไร

ดำเนินการ formatList ตาม implementation ของ ComponentUtils

ทำงานยังไง

เรียกต่อ: formatAndSortList(), literal(), withStyle(). คืนค่า: formatAndSortList(collection, string -> Component.literal(string).withStyle(ChatFormatting.GREEN)).

Parameters

  • Collection<String> collection

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

Collection<String> collection = ...;
Component result = ComponentUtils.formatList(collection);

net.minecraft.network.chat.ComponentUtils#fromMessage(Message)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:127
  • Modifiers: public static
  • Return: Component

คืออะไร

ดำเนินการ fromMessage ตาม implementation ของ ComponentUtils

ทำงานยังไง

เรียกต่อ: literal(), getString(). คืนค่า: message instanceof Component component ? component : Component.literal(message.getString()).

Parameters

  • Message message

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

Message message = ...;
Component result = ComponentUtils.fromMessage(message);

net.minecraft.network.chat.ComponentUtils#isTranslationResolvable(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:131
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Translation Resolvable

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getContents(), getKey(), getFallback(), getInstance(), has(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Component component

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

Component component = ...;
boolean result = ComponentUtils.isTranslationResolvable(component);

net.minecraft.network.chat.ComponentUtils#mergeStyles(MutableComponent,Style)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:23
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ mergeStyles ตาม implementation ของ ComponentUtils

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), getStyle(), setStyle(), equals(), applyTo(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • MutableComponent mutableComponent
  • Style style

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

MutableComponent mutableComponent = ...;
Style style = ...;
MutableComponent result = ComponentUtils.mergeStyles(mutableComponent, style);

net.minecraft.network.chat.ComponentUtils#updateForEntity(CommandSourceStack,Component,Entity,int)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:42
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

อัปเดต For Entity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: copy(), getContents(), resolve(), getSiblings(), append(), withStyle(), resolveStyle(), getStyle(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • CommandSourceStack commandSourceStack
  • Component component
  • Entity entity
  • int i

Throws

  • CommandSyntaxException

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

CommandSourceStack commandSourceStack = ...;
Component component = ...;
Entity entity = ...;
MutableComponent result = ComponentUtils.updateForEntity(commandSourceStack, component, entity, 0);

net.minecraft.network.chat.ComponentUtils#updateForEntity(CommandSourceStack,Optional<Component>,Entity,int)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:36
  • Modifiers: public static
  • Return: Optional<MutableComponent>

คืออะไร

อัปเดต For Entity

ทำงานยังไง

เรียกต่อ: isPresent(), of(), get(), empty(). คืนค่า: optional.isPresent() ? Optional.of(updateForEntity(commandSourceStack, optional.get(), entity, i)) : Optional.empty().

Parameters

  • CommandSourceStack commandSourceStack
  • Optional<Component> optional
  • Entity entity
  • int i

Throws

  • CommandSyntaxException

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

CommandSourceStack commandSourceStack = ...;
Optional<Component> optional = ...;
Entity entity = ...;
Optional<MutableComponent> result = ComponentUtils.updateForEntity(commandSourceStack, optional, entity, 0);

net.minecraft.network.chat.ComponentUtils#wrapInSquareBrackets(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ComponentUtils.java:123
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

ดำเนินการ wrapInSquareBrackets ตาม implementation ของ ComponentUtils

ทำงานยังไง

เรียกต่อ: translatable(). คืนค่า: Component.translatable("chat.square_brackets", component).

Parameters

  • Component component

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

Component component = ...;
MutableComponent result = ComponentUtils.wrapInSquareBrackets(component);

FilterMask

  • Full name: net.minecraft.network.chat.FilterMask
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/FilterMask.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.FilterMask#apply(String)

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:71
  • Modifiers: public
  • Return: String

คืออะไร

นำไปใช้ apply

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch ; มีการวนลูป. เรียกต่อ: toCharArray(), length(), get(). สร้างออบเจ็กต์: String. คืนค่า: switch (this.type) { case PASS_THROUGH -> string.

Parameters

  • String string

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

FilterMask instance = ...;
String result = instance.apply("value");

net.minecraft.network.chat.FilterMask#applyWithFormatting(String)

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:90
  • Modifiers: public
  • Return: Component

คืออะไร

นำไปใช้ With Formatting

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch ; มีการวนลูป. เรียกต่อ: literal(), empty(), get(), nextClearBit(), nextSetBit(), length(), append(), repeat(). คืนค่า: switch (this.type) { case PASS_THROUGH -> Component.literal(string).

Parameters

  • String string

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

FilterMask instance = ...;
Component result = instance.applyWithFormatting("value");

net.minecraft.network.chat.FilterMask#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:128
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: type. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Object object

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

FilterMask instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.FilterMask#FilterMask(int)

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:38
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • int i

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

FilterMask instance = new FilterMask(0);

net.minecraft.network.chat.FilterMask#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:140
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ FilterMask

ทำงานยังไง

คืนค่า: 31 * i + this.type.hashCode().

Parameters

  • ไม่มี

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

FilterMask instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.FilterMask#isEmpty()

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:120
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: type. คืนค่า: this.type == FilterMask.Type.PASS_THROUGH.

Parameters

  • ไม่มี

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

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

net.minecraft.network.chat.FilterMask#isFullyFiltered()

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:124
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Fully Filtered

ทำงานยังไง

แก้ state: type. คืนค่า: this.type == FilterMask.Type.FULLY_FILTERED.

Parameters

  • ไม่มี

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

FilterMask instance = ...;
boolean result = instance.isFullyFiltered();

net.minecraft.network.chat.FilterMask#read(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:50
  • Modifiers: public static
  • Return: FilterMask

คืออะไร

อ่าน read

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: readEnum(), readBitSet(). สร้างออบเจ็กต์: FilterMask. คืนค่า: switch (type) { case PASS_THROUGH -> PASS_THROUGH.

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

FriendlyByteBuf friendlyByteBuf = ...;
FilterMask result = FilterMask.read(friendlyByteBuf);

net.minecraft.network.chat.FilterMask#setFiltered(int)

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:67
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Filtered

ทำงานยังไง

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

Parameters

  • int i

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

FilterMask instance = ...;
instance.setFiltered(0);

net.minecraft.network.chat.FilterMask#write(FriendlyByteBuf,FilterMask)

  • Origin: common
  • Source: net/minecraft/network/chat/FilterMask.java:60
  • Modifiers: public static
  • Return: void

คืออะไร

เขียน write

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: writeEnum(), writeBitSet().

Parameters

  • FriendlyByteBuf friendlyByteBuf
  • FilterMask filterMask

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

FriendlyByteBuf friendlyByteBuf = ...;
FilterMask filterMask = ...;
FilterMask.write(friendlyByteBuf, filterMask);

FormattedText

  • Full name: net.minecraft.network.chat.FormattedText
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/FormattedText.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.FormattedText#composite(FormattedText[])

  • Origin: common
  • Source: net/minecraft/network/chat/FormattedText.java:54
  • Modifiers: static
  • Return: FormattedText

คืออะไร

ดำเนินการ composite ตาม implementation ของ FormattedText

ทำงานยังไง

เรียกต่อ: copyOf(). คืนค่า: composite(ImmutableList.copyOf(formattedTexts)).

Parameters

  • FormattedText[] formattedTexts

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

FormattedText[] formattedTexts = ...;
FormattedText result = FormattedText.composite(formattedTexts);

net.minecraft.network.chat.FormattedText#composite(List<? extends FormattedText>)

  • Origin: common
  • Source: net/minecraft/network/chat/FormattedText.java:58
  • Modifiers: static
  • Return: FormattedText

คืออะไร

ดำเนินการ composite ตาม implementation ของ FormattedText

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: visit(), isPresent(), empty(). สร้างออบเจ็กต์: FormattedText. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • List<? extends FormattedText> list

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

List<? extends FormattedText> list = ...;
FormattedText result = FormattedText.composite(list);

net.minecraft.network.chat.FormattedText#getString()

  • Origin: common
  • Source: net/minecraft/network/chat/FormattedText.java:86
  • Modifiers: default
  • Return: String

คืออะไร

อ่านค่า String

ทำงานยังไง

เรียกต่อ: visit(), append(), empty(), toString(). สร้างออบเจ็กต์: StringBuilder. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

FormattedText instance = ...;
String result = instance.getString();

net.minecraft.network.chat.FormattedText#of(String)

  • Origin: common
  • Source: net/minecraft/network/chat/FormattedText.java:26
  • Modifiers: static
  • Return: FormattedText

คืออะไร

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

ทำงานยังไง

เรียกต่อ: visit(), accept(). สร้างออบเจ็กต์: FormattedText. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • String string

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

FormattedText result = FormattedText.of("value");

net.minecraft.network.chat.FormattedText#of(String,Style)

  • Origin: common
  • Source: net/minecraft/network/chat/FormattedText.java:40
  • Modifiers: static
  • Return: FormattedText

คืออะไร

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

ทำงานยังไง

เรียกต่อ: visit(), accept(), applyTo(). สร้างออบเจ็กต์: FormattedText. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • String string
  • Style style

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

Style style = ...;
FormattedText result = FormattedText.of("value", style);

net.minecraft.network.chat.FormattedText#visit(FormattedText.ContentConsumer<T>)

  • Origin: common
  • Source: net/minecraft/network/chat/FormattedText.java:22
  • Modifiers: ``
  • Return: Optional<T>

คืออะไร

เยี่ยมชม node visit

ทำงานยังไง

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

Parameters

  • FormattedText.ContentConsumer<T> contentConsumer

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

FormattedText instance = ...;
FormattedText.ContentConsumer<T> contentConsumer = ...;
Optional<T> result = instance.visit(contentConsumer);

net.minecraft.network.chat.FormattedText#visit(FormattedText.StyledContentConsumer<T>,Style)

  • Origin: common
  • Source: net/minecraft/network/chat/FormattedText.java:24
  • Modifiers: ``
  • Return: Optional<T>

คืออะไร

เยี่ยมชม node visit

ทำงานยังไง

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

Parameters

  • FormattedText.StyledContentConsumer<T> styledContentConsumer
  • Style style

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

FormattedText instance = ...;
FormattedText.StyledContentConsumer<T> styledContentConsumer = ...;
Style style = ...;
Optional<T> result = instance.visit(styledContentConsumer, style);

HoverEvent

  • Full name: net.minecraft.network.chat.HoverEvent
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/HoverEvent.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.HoverEvent#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:56
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Object object

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

HoverEvent instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.HoverEvent#getAction()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:47
  • Modifiers: public
  • Return: HoverEvent.Action<?>

คืออะไร

อ่านค่า Action

ทำงานยังไง

คืนค่า: this.event.action.

Parameters

  • ไม่มี

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

HoverEvent instance = ...;
HoverEvent.Action<?> result = instance.getAction();

net.minecraft.network.chat.HoverEvent#getValue(HoverEvent.Action<T>)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:51
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Value

ทำงานยังไง

เรียกต่อ: cast(). คืนค่า: this.event.action == action ? action.cast(this.event.value) : null.

Parameters

  • HoverEvent.Action<T> action

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

HoverEvent instance = ...;
HoverEvent.Action<T> action = ...;
T result = instance.getValue(action);

net.minecraft.network.chat.HoverEvent#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:70
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ HoverEvent

ทำงานยังไง

คืนค่า: this.event.hashCode().

Parameters

  • ไม่มี

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

HoverEvent instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.HoverEvent#HoverEvent(HoverEvent.Action<T>,T)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:39
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

สร้างออบเจ็กต์: HoverEvent.TypedHoverEvent<>.

Parameters

  • HoverEvent.Action<T> action
  • T object

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

HoverEvent.Action<T> action = ...;
T object = ...;
HoverEvent instance = new HoverEvent(action, object);

net.minecraft.network.chat.HoverEvent#toString()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:65
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ HoverEvent

ทำงานยังไง

คืนค่า: this.event.toString().

Parameters

  • ไม่มี

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

HoverEvent instance = ...;
String result = instance.toString();

HoverEvent$Action

  • Full name: net.minecraft.network.chat.HoverEvent$Action
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/HoverEvent.java
  • Type: class
  • Modifiers: public static
  • Implements: StringRepresentable

net.minecraft.network.chat.HoverEvent$Action#Action(String,boolean,Codec<T>,HoverEvent.LegacyConverter<T>)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:94
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: name, allowFromServer, codec, legacyCodec. เรียกต่อ: xmap(), fieldOf(), decode(), flatMap(), parse(), getFirst(), map(), of(). สร้างออบเจ็กต์: HoverEvent.TypedHoverEvent<>, Codec<HoverEvent.TypedHoverEvent<T>>. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • String string
  • boolean bl
  • Codec<T> codec
  • HoverEvent.LegacyConverter<T> legacyConverter

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

Codec<T> codec = ...;
HoverEvent.LegacyConverter<T> legacyConverter = ...;
HoverEvent.Action instance = new HoverEvent.Action("value", true, codec, legacyConverter);

net.minecraft.network.chat.HoverEvent$Action#getSerializedName()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:123
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

HoverEvent.Action instance = ...;
String result = instance.getSerializedName();

net.minecraft.network.chat.HoverEvent$Action#isAllowedFromServer()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:119
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Allowed From Server

ทำงานยังไง

คืนค่า: this.allowFromServer.

Parameters

  • ไม่มี

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

HoverEvent.Action instance = ...;
boolean result = instance.isAllowedFromServer();

net.minecraft.network.chat.HoverEvent$Action#toString()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:132
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ HoverEvent$Action

ทำงานยังไง

คืนค่า: "<action " + this.name + ">".

Parameters

  • ไม่มี

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

HoverEvent.Action instance = ...;
String result = instance.toString();

HoverEvent$EntityTooltipInfo

  • Full name: net.minecraft.network.chat.HoverEvent$EntityTooltipInfo
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/HoverEvent.java
  • Type: class
  • Modifiers: public static

net.minecraft.network.chat.HoverEvent$EntityTooltipInfo#EntityTooltipInfo(EntityType<?>,UUID,Component)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:161
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<?> entityType
  • UUID uUID
  • Component component

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

EntityType<?> entityType = ...;
UUID uUID = ...;
Component component = ...;
HoverEvent.EntityTooltipInfo instance = new HoverEvent.EntityTooltipInfo(entityType, uUID, component);

net.minecraft.network.chat.HoverEvent$EntityTooltipInfo#EntityTooltipInfo(EntityType<?>,UUID,Optional<Component>)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:165
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: type, id, name.

Parameters

  • EntityType<?> entityType
  • UUID uUID
  • Optional<Component> optional

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

EntityType<?> entityType = ...;
UUID uUID = ...;
Optional<Component> optional = ...;
HoverEvent.EntityTooltipInfo instance = new HoverEvent.EntityTooltipInfo(entityType, uUID, optional);

net.minecraft.network.chat.HoverEvent$EntityTooltipInfo#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:195
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Object object

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

HoverEvent.EntityTooltipInfo instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.HoverEvent$EntityTooltipInfo#getTooltipLines()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:184
  • Modifiers: public
  • Return: List<Component>

คืออะไร

อ่านค่า Tooltip Lines

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: linesCache. เรียกต่อ: ifPresent(), add(), translatable(), getDescription(), literal(), toString(). สร้างออบเจ็กต์: ArrayList<>. คืนค่า: this.linesCache.

Parameters

  • ไม่มี

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

HoverEvent.EntityTooltipInfo instance = ...;
List<Component> result = instance.getTooltipLines();

net.minecraft.network.chat.HoverEvent$EntityTooltipInfo#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:207
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ HoverEvent$EntityTooltipInfo

ทำงานยังไง

คืนค่า: 31 * i + this.name.hashCode().

Parameters

  • ไม่มี

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

HoverEvent.EntityTooltipInfo instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.HoverEvent$EntityTooltipInfo#legacyCreate(Component,RegistryOps<?>)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:171
  • Modifiers: public static
  • Return: DataResult<HoverEvent.EntityTooltipInfo>

คืออะไร

ดำเนินการ legacyCreate ตาม implementation ของ HoverEvent$EntityTooltipInfo

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: parseTag(), getString(), withParent(), parse(), parseString(), getValue(), fromString(), map(). สร้างออบเจ็กต์: HoverEvent.EntityTooltipInfo. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Component component
  • RegistryOps<?> registryOps

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

Component component = ...;
RegistryOps<?> registryOps = ...;
DataResult<HoverEvent.EntityTooltipInfo> result = HoverEvent.EntityTooltipInfo.legacyCreate(component, registryOps);

HoverEvent$ItemStackInfo

  • Full name: net.minecraft.network.chat.HoverEvent$ItemStackInfo
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/HoverEvent.java
  • Type: class
  • Modifiers: public static

net.minecraft.network.chat.HoverEvent$ItemStackInfo#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:236
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: count. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Object object

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

HoverEvent.ItemStackInfo instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.HoverEvent$ItemStackInfo#getItemStack()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:255
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Item Stack

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: itemStack. สร้างออบเจ็กต์: ItemStack. คืนค่า: this.itemStack.

Parameters

  • ไม่มี

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

HoverEvent.ItemStackInfo instance = ...;
ItemStack result = instance.getItemStack();

net.minecraft.network.chat.HoverEvent$ItemStackInfo#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:248
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ HoverEvent$ItemStackInfo

ทำงานยังไง

คืนค่า: 31 * i + this.components.hashCode().

Parameters

  • ไม่มี

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

HoverEvent.ItemStackInfo instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.HoverEvent$ItemStackInfo#ItemStackInfo(ItemStack)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:232
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getItemHolder(), getCount(), getComponentsPatch().

Parameters

  • ItemStack itemStack

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

ItemStack itemStack = ...;
HoverEvent.ItemStackInfo instance = new HoverEvent.ItemStackInfo(itemStack);

HoverEvent$LegacyConverter

  • Full name: net.minecraft.network.chat.HoverEvent$LegacyConverter
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/HoverEvent.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.HoverEvent$LegacyConverter#parse(Component,RegistryOps<?>)

  • Origin: common
  • Source: net/minecraft/network/chat/HoverEvent.java:275
  • Modifiers: ``
  • Return: DataResult<T>

คืออะไร

แปลง/วิเคราะห์ข้อมูล parse

ทำงานยังไง

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

Parameters

  • Component component
  • RegistryOps<?> registryOps

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

HoverEvent.LegacyConverter instance = ...;
Component component = ...;
RegistryOps<?> registryOps = ...;
DataResult<T> result = instance.parse(component, registryOps);

LastSeenMessages

  • Full name: net.minecraft.network.chat.LastSeenMessages
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/LastSeenMessages.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.LastSeenMessages#pack(MessageSignatureCache)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessages.java:26
  • Modifiers: public
  • Return: LastSeenMessages.Packed

คืออะไร

ดำเนินการ pack ตาม implementation ของ LastSeenMessages

ทำงานยังไง

เรียกต่อ: Packed(), stream(), map(), toList(). สร้างออบเจ็กต์: LastSeenMessages.Packed. คืนค่า: new LastSeenMessages.Packed(this.entries.stream().map(messageSignature -> messageSignature.pack(messageSignatureCache)).toList()).

Parameters

  • MessageSignatureCache messageSignatureCache

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

LastSeenMessages instance = ...;
MessageSignatureCache messageSignatureCache = ...;
LastSeenMessages.Packed result = instance.pack(messageSignatureCache);

net.minecraft.network.chat.LastSeenMessages#updateSignature(SignatureUpdater.Output)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessages.java:18
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Signature

ทำงานยังไง

มีการวนลูป. เรียกต่อ: update(), toByteArray(), size(), bytes().

Parameters

  • SignatureUpdater.Output output

Throws

  • SignatureException

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

LastSeenMessages instance = ...;
SignatureUpdater.Output output = ...;
instance.updateSignature(output);

LastSeenMessages$Packed

  • Full name: net.minecraft.network.chat.LastSeenMessages$Packed
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/LastSeenMessages.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.LastSeenMessages$Packed#Packed(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessages.java:33
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: readCollection(), limitValue().

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

FriendlyByteBuf friendlyByteBuf = ...;
LastSeenMessages.Packed instance = new LastSeenMessages.Packed(friendlyByteBuf);

net.minecraft.network.chat.LastSeenMessages$Packed#unpack(MessageSignatureCache)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessages.java:41
  • Modifiers: public
  • Return: Optional<LastSeenMessages>

คืออะไร

ดำเนินการ unpack ตาม implementation ของ LastSeenMessages$Packed

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), isEmpty(), empty(), add(), get(), of(). สร้างออบเจ็กต์: ArrayList<>, LastSeenMessages. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • MessageSignatureCache messageSignatureCache

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

LastSeenMessages.Packed instance = ...;
MessageSignatureCache messageSignatureCache = ...;
Optional<LastSeenMessages> result = instance.unpack(messageSignatureCache);

net.minecraft.network.chat.LastSeenMessages$Packed#write(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessages.java:37
  • Modifiers: public
  • Return: void

คืออะไร

เขียน write

ทำงานยังไง

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

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

LastSeenMessages.Packed instance = ...;
FriendlyByteBuf friendlyByteBuf = ...;
instance.write(friendlyByteBuf);

LastSeenMessages$Update

  • Full name: net.minecraft.network.chat.LastSeenMessages$Update
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/LastSeenMessages.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.LastSeenMessages$Update#Update(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessages.java:58
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: readVarInt(), readFixedBitSet().

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

FriendlyByteBuf friendlyByteBuf = ...;
LastSeenMessages.Update instance = new LastSeenMessages.Update(friendlyByteBuf);

net.minecraft.network.chat.LastSeenMessages$Update#write(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessages.java:62
  • Modifiers: public
  • Return: void

คืออะไร

เขียน write

ทำงานยังไง

เรียกต่อ: writeVarInt(), writeFixedBitSet().

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

LastSeenMessages.Update instance = ...;
FriendlyByteBuf friendlyByteBuf = ...;
instance.write(friendlyByteBuf);

LastSeenMessagesTracker

  • Full name: net.minecraft.network.chat.LastSeenMessagesTracker
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/LastSeenMessagesTracker.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.LastSeenMessagesTracker#addPending(MessageSignature,boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesTracker.java:20
  • Modifiers: public
  • Return: boolean

คืออะไร

เพิ่ม Pending

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastTrackedMessage. เรียกต่อ: equals(), addEntry(). สร้างออบเจ็กต์: LastSeenTrackedEntry. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • MessageSignature messageSignature
  • boolean bl

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

LastSeenMessagesTracker instance = ...;
MessageSignature messageSignature = ...;
boolean result = instance.addPending(messageSignature, true);

net.minecraft.network.chat.LastSeenMessagesTracker#generateAndApplyUpdate()

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesTracker.java:53
  • Modifiers: public
  • Return: LastSeenMessagesTracker.Update

คืออะไร

ดำเนินการ generateAndApplyUpdate ตาม implementation ของ LastSeenMessagesTracker

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getAndClearOffset(), set(), add(), signature(), acknowledge(), Update(). สร้างออบเจ็กต์: BitSet, ObjectArrayList<>, LastSeenMessages, LastSeenMessages.Update. คืนค่า: new LastSeenMessagesTracker.Update(lastSeenMessages, update).

Parameters

  • ไม่มี

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

LastSeenMessagesTracker instance = ...;
LastSeenMessagesTracker.Update result = instance.generateAndApplyUpdate();

net.minecraft.network.chat.LastSeenMessagesTracker#getAndClearOffset()

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesTracker.java:47
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า And Clear Offset

ทำงานยังไง

แก้ state: offset. คืนค่า: i.

Parameters

  • ไม่มี

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

LastSeenMessagesTracker instance = ...;
int result = instance.getAndClearOffset();

net.minecraft.network.chat.LastSeenMessagesTracker#ignorePending(MessageSignature)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesTracker.java:37
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ ignorePending ตาม implementation ของ LastSeenMessagesTracker

ทำงานยังไง

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

Parameters

  • MessageSignature messageSignature

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

LastSeenMessagesTracker instance = ...;
MessageSignature messageSignature = ...;
instance.ignorePending(messageSignature);

net.minecraft.network.chat.LastSeenMessagesTracker#LastSeenMessagesTracker(int)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesTracker.java:16
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: trackedMessages.

Parameters

  • int i

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

LastSeenMessagesTracker instance = new LastSeenMessagesTracker(0);

net.minecraft.network.chat.LastSeenMessagesTracker#offset()

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesTracker.java:73
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ offset ตาม implementation ของ LastSeenMessagesTracker

ทำงานยังไง

คืนค่า: this.offset.

Parameters

  • ไม่มี

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

LastSeenMessagesTracker instance = ...;
int result = instance.offset();

LastSeenMessagesValidator

  • Full name: net.minecraft.network.chat.LastSeenMessagesValidator
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/LastSeenMessagesValidator.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.LastSeenMessagesValidator#addPending(MessageSignature)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesValidator.java:22
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Pending

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastPendingMessage. เรียกต่อ: equals(), add(). สร้างออบเจ็กต์: LastSeenTrackedEntry.

Parameters

  • MessageSignature messageSignature

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

LastSeenMessagesValidator instance = ...;
MessageSignature messageSignature = ...;
instance.addPending(messageSignature);

net.minecraft.network.chat.LastSeenMessagesValidator#applyOffset(int)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesValidator.java:33
  • Modifiers: public
  • Return: boolean

คืออะไร

นำไปใช้ Offset

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: size(), removeElements(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • int i

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

LastSeenMessagesValidator instance = ...;
boolean result = instance.applyOffset(0);

net.minecraft.network.chat.LastSeenMessagesValidator#applyUpdate(LastSeenMessages.Update)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesValidator.java:43
  • Modifiers: public
  • Return: Optional<LastSeenMessages>

คืออะไร

นำไปใช้ Update

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: applyOffset(), offset(), empty(), acknowledged(), cardinality(), length(), get(), set(). สร้างออบเจ็กต์: ObjectArrayList<>, LastSeenMessages. มีจุด return อย่างน้อย 5 จุด.

Parameters

  • LastSeenMessages.Update update

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

LastSeenMessagesValidator instance = ...;
LastSeenMessages.Update update = ...;
Optional<LastSeenMessages> result = instance.applyUpdate(update);

net.minecraft.network.chat.LastSeenMessagesValidator#LastSeenMessagesValidator(int)

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesValidator.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

มีการวนลูป. แก้ state: lastSeenCount. เรียกต่อ: add().

Parameters

  • int i

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

LastSeenMessagesValidator instance = new LastSeenMessagesValidator(0);

net.minecraft.network.chat.LastSeenMessagesValidator#trackedMessagesCount()

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenMessagesValidator.java:29
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ trackedMessagesCount ตาม implementation ของ LastSeenMessagesValidator

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LastSeenMessagesValidator instance = ...;
int result = instance.trackedMessagesCount();

LastSeenTrackedEntry

  • Full name: net.minecraft.network.chat.LastSeenTrackedEntry
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/LastSeenTrackedEntry.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.LastSeenTrackedEntry#acknowledge()

  • Origin: common
  • Source: net/minecraft/network/chat/LastSeenTrackedEntry.java:4
  • Modifiers: public
  • Return: LastSeenTrackedEntry

คืออะไร

ดำเนินการ acknowledge ตาม implementation ของ LastSeenTrackedEntry

ทำงานยังไง

สร้างออบเจ็กต์: LastSeenTrackedEntry. คืนค่า: this.pending ? new LastSeenTrackedEntry(this.signature, false) : this.

Parameters

  • ไม่มี

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

LastSeenTrackedEntry instance = ...;
LastSeenTrackedEntry result = instance.acknowledge();

LocalChatSession

  • Full name: net.minecraft.network.chat.LocalChatSession
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/LocalChatSession.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.LocalChatSession#asRemote()

  • Origin: common
  • Source: net/minecraft/network/chat/LocalChatSession.java:16
  • Modifiers: public
  • Return: RemoteChatSession

คืออะไร

ดำเนินการ asRemote ตาม implementation ของ LocalChatSession

ทำงานยังไง

เรียกต่อ: publicKey(). สร้างออบเจ็กต์: RemoteChatSession. คืนค่า: new RemoteChatSession(this.sessionId, this.keyPair.publicKey()).

Parameters

  • ไม่มี

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

LocalChatSession instance = ...;
RemoteChatSession result = instance.asRemote();

net.minecraft.network.chat.LocalChatSession#create(ProfileKeyPair)

  • Origin: common
  • Source: net/minecraft/network/chat/LocalChatSession.java:8
  • Modifiers: public static
  • Return: LocalChatSession

คืออะไร

สร้าง create

ทำงานยังไง

เรียกต่อ: randomUUID(). สร้างออบเจ็กต์: LocalChatSession. คืนค่า: new LocalChatSession(UUID.randomUUID(), profileKeyPair).

Parameters

  • ProfileKeyPair profileKeyPair

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

ProfileKeyPair profileKeyPair = ...;
LocalChatSession result = LocalChatSession.create(profileKeyPair);

net.minecraft.network.chat.LocalChatSession#createMessageEncoder(UUID)

  • Origin: common
  • Source: net/minecraft/network/chat/LocalChatSession.java:12
  • Modifiers: public
  • Return: SignedMessageChain.Encoder

คืออะไร

สร้าง Message Encoder

ทำงานยังไง

เรียกต่อ: encoder(), from(), privateKey(). สร้างออบเจ็กต์: SignedMessageChain. คืนค่า: new SignedMessageChain(uUID, this.sessionId).encoder(Signer.from(this.keyPair.privateKey(), "SHA256withRSA")).

Parameters

  • UUID uUID

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

LocalChatSession instance = ...;
UUID uUID = ...;
SignedMessageChain.Encoder result = instance.createMessageEncoder(uUID);

MessageSignature

  • Full name: net.minecraft.network.chat.MessageSignature
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/MessageSignature.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.MessageSignature#asByteBuffer()

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:37
  • Modifiers: public
  • Return: ByteBuffer

คืออะไร

ดำเนินการ asByteBuffer ตาม implementation ของ MessageSignature

ทำงานยังไง

เรียกต่อ: wrap(). คืนค่า: ByteBuffer.wrap(this.bytes).

Parameters

  • ไม่มี

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

MessageSignature instance = ...;
ByteBuffer result = instance.asByteBuffer();

net.minecraft.network.chat.MessageSignature#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:41
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

คืนค่า: this == object || object instanceof MessageSignature messageSignature && Arrays.equals(this.bytes, messageSignature.bytes).

Parameters

  • Object object

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

MessageSignature instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.MessageSignature#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:46
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ MessageSignature

ทำงานยังไง

คืนค่า: Arrays.hashCode(this.bytes).

Parameters

  • ไม่มี

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

MessageSignature instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.MessageSignature#MessageSignature(byte[])

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • byte[] bytes

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

byte[] bytes = ...;
MessageSignature instance = new MessageSignature(bytes);

net.minecraft.network.chat.MessageSignature#pack(MessageSignatureCache)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:56
  • Modifiers: public
  • Return: MessageSignature.Packed

คืออะไร

ดำเนินการ pack ตาม implementation ของ MessageSignature

ทำงานยังไง

เรียกต่อ: Packed(). สร้างออบเจ็กต์: MessageSignature.Packed. คืนค่า: i != -1 ? new MessageSignature.Packed(i) : new MessageSignature.Packed(this).

Parameters

  • MessageSignatureCache messageSignatureCache

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

MessageSignature instance = ...;
MessageSignatureCache messageSignatureCache = ...;
MessageSignature.Packed result = instance.pack(messageSignatureCache);

net.minecraft.network.chat.MessageSignature#read(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:23
  • Modifiers: public static
  • Return: MessageSignature

คืออะไร

อ่าน read

ทำงานยังไง

เรียกต่อ: readBytes(). สร้างออบเจ็กต์: MessageSignature. คืนค่า: new MessageSignature(bs).

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

FriendlyByteBuf friendlyByteBuf = ...;
MessageSignature result = MessageSignature.read(friendlyByteBuf);

net.minecraft.network.chat.MessageSignature#toString()

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:51
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ MessageSignature

ทำงานยังไง

เรียกต่อ: getEncoder(), encodeToString(). คืนค่า: Base64.getEncoder().encodeToString(this.bytes).

Parameters

  • ไม่มี

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

MessageSignature instance = ...;
String result = instance.toString();

net.minecraft.network.chat.MessageSignature#verify(SignatureValidator,SignatureUpdater)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:33
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ verify ตาม implementation ของ MessageSignature

ทำงานยังไง

เรียกต่อ: validate(). คืนค่า: signatureValidator.validate(signatureUpdater, this.bytes).

Parameters

  • SignatureValidator signatureValidator
  • SignatureUpdater signatureUpdater

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

MessageSignature instance = ...;
SignatureValidator signatureValidator = ...;
SignatureUpdater signatureUpdater = ...;
boolean result = instance.verify(signatureValidator, signatureUpdater);

net.minecraft.network.chat.MessageSignature#write(FriendlyByteBuf,MessageSignature)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:29
  • Modifiers: public static
  • Return: void

คืออะไร

เขียน write

ทำงานยังไง

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

Parameters

  • FriendlyByteBuf friendlyByteBuf
  • MessageSignature messageSignature

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

FriendlyByteBuf friendlyByteBuf = ...;
MessageSignature messageSignature = ...;
MessageSignature.write(friendlyByteBuf, messageSignature);

MessageSignature$Packed

  • Full name: net.minecraft.network.chat.MessageSignature$Packed
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/MessageSignature.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.MessageSignature$Packed#Packed(int)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:68
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • int i

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

MessageSignature.Packed instance = new MessageSignature.Packed(0);

net.minecraft.network.chat.MessageSignature$Packed#Packed(MessageSignature)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:64
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • MessageSignature messageSignature

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

MessageSignature messageSignature = ...;
MessageSignature.Packed instance = new MessageSignature.Packed(messageSignature);

net.minecraft.network.chat.MessageSignature$Packed#read(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:72
  • Modifiers: public static
  • Return: MessageSignature.Packed

คืออะไร

อ่าน read

ทำงานยังไง

เรียกต่อ: readVarInt(), Packed(). สร้างออบเจ็กต์: MessageSignature.Packed. คืนค่า: i == -1 ? new MessageSignature.Packed(MessageSignature.read(friendlyByteBuf)) : new MessageSignature.Packed(i).

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

FriendlyByteBuf friendlyByteBuf = ...;
MessageSignature.Packed result = MessageSignature.Packed.read(friendlyByteBuf);

net.minecraft.network.chat.MessageSignature$Packed#unpack(MessageSignatureCache)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:84
  • Modifiers: public
  • Return: Optional<MessageSignature>

คืออะไร

ดำเนินการ unpack ตาม implementation ของ MessageSignature$Packed

ทำงานยังไง

เรียกต่อ: of(), ofNullable(). คืนค่า: this.fullSignature != null ? Optional.of(this.fullSignature) : Optional.ofNullable(messageSignatureCache.unpack(this.id)).

Parameters

  • MessageSignatureCache messageSignatureCache

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

MessageSignature.Packed instance = ...;
MessageSignatureCache messageSignatureCache = ...;
Optional<MessageSignature> result = instance.unpack(messageSignatureCache);

net.minecraft.network.chat.MessageSignature$Packed#write(FriendlyByteBuf,MessageSignature.Packed)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignature.java:77
  • Modifiers: public static
  • Return: void

คืออะไร

เขียน write

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: writeVarInt(), id(), fullSignature().

Parameters

  • FriendlyByteBuf friendlyByteBuf
  • MessageSignature.Packed packed

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

FriendlyByteBuf friendlyByteBuf = ...;
MessageSignature.Packed packed = ...;
MessageSignature.Packed.write(friendlyByteBuf, packed);

MessageSignatureCache

  • Full name: net.minecraft.network.chat.MessageSignatureCache
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/MessageSignatureCache.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.MessageSignatureCache#createDefault()

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignatureCache.java:19
  • Modifiers: public static
  • Return: MessageSignatureCache

คืออะไร

สร้าง Default

ทำงานยังไง

สร้างออบเจ็กต์: MessageSignatureCache. คืนค่า: new MessageSignatureCache(128).

Parameters

  • ไม่มี

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

MessageSignatureCache result = MessageSignatureCache.createDefault();

net.minecraft.network.chat.MessageSignatureCache#MessageSignatureCache(int)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignatureCache.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: entries.

Parameters

  • int i

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

MessageSignatureCache instance = new MessageSignatureCache(0);

net.minecraft.network.chat.MessageSignatureCache#pack(MessageSignature)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignatureCache.java:23
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ pack ตาม implementation ของ MessageSignatureCache

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: equals(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • MessageSignature messageSignature

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

MessageSignatureCache instance = ...;
MessageSignature messageSignature = ...;
int result = instance.pack(messageSignature);

net.minecraft.network.chat.MessageSignatureCache#push(SignedMessageBody,MessageSignature)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignatureCache.java:38
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ push ตาม implementation ของ MessageSignatureCache

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: lastSeen(), entries(), size(), addAll(), add(). สร้างออบเจ็กต์: ArrayDeque<>.

Parameters

  • SignedMessageBody signedMessageBody
  • MessageSignature messageSignature

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

MessageSignatureCache instance = ...;
SignedMessageBody signedMessageBody = ...;
MessageSignature messageSignature = ...;
instance.push(signedMessageBody, messageSignature);

net.minecraft.network.chat.MessageSignatureCache#unpack(int)

  • Origin: common
  • Source: net/minecraft/network/chat/MessageSignatureCache.java:33
  • Modifiers: public
  • Return: MessageSignature

คืออะไร

ดำเนินการ unpack ตาม implementation ของ MessageSignatureCache

ทำงานยังไง

คืนค่า: this.entries[i].

Parameters

  • int i

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

MessageSignatureCache instance = ...;
MessageSignature result = instance.unpack(0);

MutableComponent

  • Full name: net.minecraft.network.chat.MutableComponent
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/MutableComponent.java
  • Type: class
  • Modifiers: public
  • Implements: Component

net.minecraft.network.chat.MutableComponent#append(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:54
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

ดำเนินการ append ตาม implementation ของ MutableComponent

ทำงานยังไง

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

Parameters

  • Component component

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

MutableComponent instance = ...;
Component component = ...;
MutableComponent result = instance.append(component);

net.minecraft.network.chat.MutableComponent#append(String)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:50
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

ดำเนินการ append ตาม implementation ของ MutableComponent

ทำงานยังไง

เรียกต่อ: isEmpty(), literal(). คืนค่า: string.isEmpty() ? this : this.append(Component.literal(string)).

Parameters

  • String string

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

MutableComponent instance = ...;
MutableComponent result = instance.append("value");

net.minecraft.network.chat.MutableComponent#create(ComponentContents)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:26
  • Modifiers: public static
  • Return: MutableComponent

คืออะไร

สร้าง create

ทำงานยังไง

เรียกต่อ: newArrayList(). สร้างออบเจ็กต์: MutableComponent. คืนค่า: new MutableComponent(componentContents, Lists.newArrayList(), Style.EMPTY).

Parameters

  • ComponentContents componentContents

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

ComponentContents componentContents = ...;
MutableComponent result = MutableComponent.create(componentContents);

net.minecraft.network.chat.MutableComponent#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:95
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. คืนค่า: true.

Parameters

  • Object object

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

MutableComponent instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.MutableComponent#getContents()

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:30
  • Modifiers: public
  • Return: ComponentContents

คืออะไร

อ่านค่า Contents

ทำงานยังไง

คืนค่า: this.contents.

Parameters

  • ไม่มี

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

MutableComponent instance = ...;
ComponentContents result = instance.getContents();

net.minecraft.network.chat.MutableComponent#getSiblings()

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:35
  • Modifiers: public
  • Return: List<Component>

คืออะไร

อ่านค่า Siblings

ทำงานยังไง

คืนค่า: this.siblings.

Parameters

  • ไม่มี

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

MutableComponent instance = ...;
List<Component> result = instance.getSiblings();

net.minecraft.network.chat.MutableComponent#getStyle()

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:45
  • Modifiers: public
  • Return: Style

คืออะไร

อ่านค่า Style

ทำงานยังไง

คืนค่า: this.style.

Parameters

  • ไม่มี

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

MutableComponent instance = ...;
Style result = instance.getStyle();

net.minecraft.network.chat.MutableComponent#getVisualOrderText()

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:84
  • Modifiers: public
  • Return: FormattedCharSequence

คืออะไร

อ่านค่า Visual Order Text

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: visualOrderText, decomposedWith. เรียกต่อ: getInstance(), getVisualOrder(). คืนค่า: this.visualOrderText.

Parameters

  • ไม่มี

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

MutableComponent instance = ...;
FormattedCharSequence result = instance.getVisualOrderText();

net.minecraft.network.chat.MutableComponent#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:106
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ MutableComponent

ทำงานยังไง

เรียกต่อ: hash(). คืนค่า: Objects.hash(this.contents, this.style, this.siblings).

Parameters

  • ไม่มี

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

MutableComponent instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.MutableComponent#setStyle(Style)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:40
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

กำหนดค่า Style

ทำงานยังไง

แก้ state: style. คืนค่า: this.

Parameters

  • Style style

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

MutableComponent instance = ...;
Style style = ...;
MutableComponent result = instance.setStyle(style);

net.minecraft.network.chat.MutableComponent#toString()

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:111
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ MutableComponent

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), append(). สร้างออบเจ็กต์: StringBuilder. คืนค่า: stringBuilder.toString().

Parameters

  • ไม่มี

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

MutableComponent instance = ...;
String result = instance.toString();

net.minecraft.network.chat.MutableComponent#withColor(int)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:79
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

ดำเนินการ withColor ตาม implementation ของ MutableComponent

ทำงานยังไง

เรียกต่อ: setStyle(), getStyle(). คืนค่า: this.

Parameters

  • int i

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

MutableComponent instance = ...;
MutableComponent result = instance.withColor(0);

net.minecraft.network.chat.MutableComponent#withStyle(ChatFormatting)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:74
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

ดำเนินการ withStyle ตาม implementation ของ MutableComponent

ทำงานยังไง

เรียกต่อ: setStyle(), getStyle(), applyFormat(). คืนค่า: this.

Parameters

  • ChatFormatting chatFormatting

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

MutableComponent instance = ...;
ChatFormatting chatFormatting = ...;
MutableComponent result = instance.withStyle(chatFormatting);

net.minecraft.network.chat.MutableComponent#withStyle(ChatFormatting[])

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:69
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

ดำเนินการ withStyle ตาม implementation ของ MutableComponent

ทำงานยังไง

เรียกต่อ: setStyle(), getStyle(), applyFormats(). คืนค่า: this.

Parameters

  • ChatFormatting[] chatFormattings

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

MutableComponent instance = ...;
ChatFormatting[] chatFormattings = ...;
MutableComponent result = instance.withStyle(chatFormattings);

net.minecraft.network.chat.MutableComponent#withStyle(Style)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:64
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

ดำเนินการ withStyle ตาม implementation ของ MutableComponent

ทำงานยังไง

เรียกต่อ: setStyle(), applyTo(), getStyle(). คืนค่า: this.

Parameters

  • Style style

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

MutableComponent instance = ...;
Style style = ...;
MutableComponent result = instance.withStyle(style);

net.minecraft.network.chat.MutableComponent#withStyle(UnaryOperator<Style>)

  • Origin: common
  • Source: net/minecraft/network/chat/MutableComponent.java:59
  • Modifiers: public
  • Return: MutableComponent

คืออะไร

ดำเนินการ withStyle ตาม implementation ของ MutableComponent

ทำงานยังไง

เรียกต่อ: setStyle(), apply(), getStyle(). คืนค่า: this.

Parameters

  • UnaryOperator<Style> unaryOperator

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

MutableComponent instance = ...;
UnaryOperator<Style> unaryOperator = ...;
MutableComponent result = instance.withStyle(unaryOperator);

OutgoingChatMessage

  • Full name: net.minecraft.network.chat.OutgoingChatMessage
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/OutgoingChatMessage.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.OutgoingChatMessage#content()

  • Origin: common
  • Source: net/minecraft/network/chat/OutgoingChatMessage.java:6
  • Modifiers: ``
  • Return: Component

คืออะไร

ดำเนินการ content ตาม implementation ของ OutgoingChatMessage

ทำงานยังไง

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

Parameters

  • ไม่มี

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

OutgoingChatMessage instance = ...;
Component result = instance.content();

net.minecraft.network.chat.OutgoingChatMessage#create(PlayerChatMessage)

  • Origin: common
  • Source: net/minecraft/network/chat/OutgoingChatMessage.java:10
  • Modifiers: static
  • Return: OutgoingChatMessage

คืออะไร

สร้าง create

ทำงานยังไง

เรียกต่อ: isSystem(), Disguised(), decoratedContent(), Player(). สร้างออบเจ็กต์: OutgoingChatMessage.Disguised, OutgoingChatMessage.Player. คืนค่า: playerChatMessage.isSystem() ? new OutgoingChatMessage.Disguised(playerChatMessage.decoratedContent()) : new OutgoingChatMessage.Player(playerChatMessage).

Parameters

  • PlayerChatMessage playerChatMessage

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

PlayerChatMessage playerChatMessage = ...;
OutgoingChatMessage result = OutgoingChatMessage.create(playerChatMessage);

net.minecraft.network.chat.OutgoingChatMessage#sendToPlayer(ServerPlayer,boolean,ChatType.Bound)

  • Origin: common
  • Source: net/minecraft/network/chat/OutgoingChatMessage.java:8
  • Modifiers: ``
  • Return: void

คืออะไร

ส่ง To Player

ทำงานยังไง

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

Parameters

  • ServerPlayer serverPlayer
  • boolean bl
  • ChatType.Bound bound

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

OutgoingChatMessage instance = ...;
ServerPlayer serverPlayer = ...;
ChatType.Bound bound = ...;
instance.sendToPlayer(serverPlayer, true, bound);

PlayerChatMessage

  • Full name: net.minecraft.network.chat.PlayerChatMessage
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/PlayerChatMessage.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.PlayerChatMessage#decoratedContent()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:86
  • Modifiers: public
  • Return: Component

คืออะไร

ดำเนินการ decoratedContent ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

เรียกต่อ: requireNonNullElseGet(), literal(), signedContent(). คืนค่า: Objects.requireNonNullElseGet(this.unsignedContent, () -> Component.literal(this.signedContent())).

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
Component result = instance.decoratedContent();

net.minecraft.network.chat.PlayerChatMessage#filter(boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:62
  • Modifiers: public
  • Return: PlayerChatMessage

คืออะไร

ดำเนินการ filter ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

คืนค่า: this.filter(bl ? this.filterMask : FilterMask.PASS_THROUGH).

Parameters

  • boolean bl

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

PlayerChatMessage instance = ...;
PlayerChatMessage result = instance.filter(true);

net.minecraft.network.chat.PlayerChatMessage#filter(FilterMask)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:58
  • Modifiers: public
  • Return: PlayerChatMessage

คืออะไร

ดำเนินการ filter ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

เรียกต่อ: equals(). สร้างออบเจ็กต์: PlayerChatMessage. คืนค่า: this.filterMask.equals(filterMask) ? this : new PlayerChatMessage(this.link, this.signature, this.signedBody, this.unsignedContent, filterMask).

Parameters

  • FilterMask filterMask

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

PlayerChatMessage instance = ...;
FilterMask filterMask = ...;
PlayerChatMessage result = instance.filter(filterMask);

net.minecraft.network.chat.PlayerChatMessage#hasExpiredClient(Instant)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:102
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Expired Client

ทำงานยังไง

เรียกต่อ: isAfter(), timeStamp(), plus(). คืนค่า: instant.isAfter(this.timeStamp().plus(MESSAGE_EXPIRES_AFTER_CLIENT)).

Parameters

  • Instant instant

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

PlayerChatMessage instance = ...;
Instant instant = ...;
boolean result = instance.hasExpiredClient(instant);

net.minecraft.network.chat.PlayerChatMessage#hasExpiredServer(Instant)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:98
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Expired Server

ทำงานยังไง

เรียกต่อ: isAfter(), timeStamp(), plus(). คืนค่า: instant.isAfter(this.timeStamp().plus(MESSAGE_EXPIRES_AFTER_SERVER)).

Parameters

  • Instant instant

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

PlayerChatMessage instance = ...;
Instant instant = ...;
boolean result = instance.hasExpiredServer(instant);

net.minecraft.network.chat.PlayerChatMessage#hasSignature()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:114
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.signature != null.

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
boolean result = instance.hasSignature();

net.minecraft.network.chat.PlayerChatMessage#hasSignatureFrom(UUID)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:118
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Signature From

ทำงานยังไง

เรียกต่อ: hasSignature(), sender(), equals(). คืนค่า: this.hasSignature() && this.link.sender().equals(uUID).

Parameters

  • UUID uUID

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

PlayerChatMessage instance = ...;
UUID uUID = ...;
boolean result = instance.hasSignatureFrom(uUID);

net.minecraft.network.chat.PlayerChatMessage#isFullyFiltered()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:122
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Fully Filtered

ทำงานยังไง

คืนค่า: this.filterMask.isFullyFiltered().

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
boolean result = instance.isFullyFiltered();

net.minecraft.network.chat.PlayerChatMessage#isSystem()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:110
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: sender(), equals(). คืนค่า: this.sender().equals(SYSTEM_SENDER).

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
boolean result = instance.isSystem();

net.minecraft.network.chat.PlayerChatMessage#removeSignature()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:66
  • Modifiers: public
  • Return: PlayerChatMessage

คืออะไร

ลบ Signature

ทำงานยังไง

เรียกต่อ: unsigned(), signedContent(), sender(). สร้างออบเจ็กต์: PlayerChatMessage. คืนค่า: new PlayerChatMessage(signedMessageLink, null, signedMessageBody, this.unsignedContent, this.filterMask).

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
PlayerChatMessage result = instance.removeSignature();

net.minecraft.network.chat.PlayerChatMessage#removeUnsignedContent()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:54
  • Modifiers: public
  • Return: PlayerChatMessage

คืออะไร

ลบ Unsigned Content

ทำงานยังไง

สร้างออบเจ็กต์: PlayerChatMessage. คืนค่า: this.unsignedContent != null ? new PlayerChatMessage(this.link, this.signature, this.signedBody, null, this.filterMask) : this.

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
PlayerChatMessage result = instance.removeUnsignedContent();

net.minecraft.network.chat.PlayerChatMessage#salt()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:94
  • Modifiers: public
  • Return: long

คืออะไร

ดำเนินการ salt ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

คืนค่า: this.signedBody.salt().

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
long result = instance.salt();

net.minecraft.network.chat.PlayerChatMessage#sender()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:106
  • Modifiers: public
  • Return: UUID

คืออะไร

ดำเนินการ sender ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

คืนค่า: this.link.sender().

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
UUID result = instance.sender();

net.minecraft.network.chat.PlayerChatMessage#signedContent()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:82
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ signedContent ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
String result = instance.signedContent();

net.minecraft.network.chat.PlayerChatMessage#system(String)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:39
  • Modifiers: public static
  • Return: PlayerChatMessage

คืออะไร

ดำเนินการ system ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

เรียกต่อ: unsigned(). คืนค่า: unsigned(SYSTEM_SENDER, string).

Parameters

  • String string

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

PlayerChatMessage result = PlayerChatMessage.system("value");

net.minecraft.network.chat.PlayerChatMessage#timeStamp()

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:90
  • Modifiers: public
  • Return: Instant

คืออะไร

ดำเนินการ timeStamp ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

คืนค่า: this.signedBody.timeStamp().

Parameters

  • ไม่มี

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

PlayerChatMessage instance = ...;
Instant result = instance.timeStamp();

net.minecraft.network.chat.PlayerChatMessage#unsigned(UUID,String)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:43
  • Modifiers: public static
  • Return: PlayerChatMessage

คืออะไร

ดำเนินการ unsigned ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

สร้างออบเจ็กต์: PlayerChatMessage. คืนค่า: new PlayerChatMessage(signedMessageLink, null, signedMessageBody, null, FilterMask.PASS_THROUGH).

Parameters

  • UUID uUID
  • String string

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

UUID uUID = ...;
PlayerChatMessage result = PlayerChatMessage.unsigned(uUID, "value");

net.minecraft.network.chat.PlayerChatMessage#updateSignature(SignatureUpdater.Output,SignedMessageLink,SignedMessageBody)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:72
  • Modifiers: public static
  • Return: void

คืออะไร

อัปเดต Signature

ทำงานยังไง

เรียกต่อ: update(), toByteArray().

Parameters

  • SignatureUpdater.Output output
  • SignedMessageLink signedMessageLink
  • SignedMessageBody signedMessageBody

Throws

  • SignatureException

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

SignatureUpdater.Output output = ...;
SignedMessageLink signedMessageLink = ...;
SignedMessageBody signedMessageBody = ...;
PlayerChatMessage.updateSignature(output, signedMessageLink, signedMessageBody);

net.minecraft.network.chat.PlayerChatMessage#verify(SignatureValidator)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:78
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ verify ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

เรียกต่อ: updateSignature(). คืนค่า: this.signature != null && this.signature.verify(signatureValidator, output -> updateSignature(output, this.link, this.signedBody)).

Parameters

  • SignatureValidator signatureValidator

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

PlayerChatMessage instance = ...;
SignatureValidator signatureValidator = ...;
boolean result = instance.verify(signatureValidator);

net.minecraft.network.chat.PlayerChatMessage#withUnsignedContent(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/PlayerChatMessage.java:49
  • Modifiers: public
  • Return: PlayerChatMessage

คืออะไร

ดำเนินการ withUnsignedContent ตาม implementation ของ PlayerChatMessage

ทำงานยังไง

เรียกต่อ: equals(), literal(), signedContent(). สร้างออบเจ็กต์: PlayerChatMessage. คืนค่า: new PlayerChatMessage(this.link, this.signature, this.signedBody, component2, this.filterMask).

Parameters

  • Component component

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

PlayerChatMessage instance = ...;
Component component = ...;
PlayerChatMessage result = instance.withUnsignedContent(component);

RemoteChatSession

  • Full name: net.minecraft.network.chat.RemoteChatSession
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/RemoteChatSession.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.RemoteChatSession#asData()

  • Origin: common
  • Source: net/minecraft/network/chat/RemoteChatSession.java:19
  • Modifiers: public
  • Return: RemoteChatSession.Data

คืออะไร

ดำเนินการ asData ตาม implementation ของ RemoteChatSession

ทำงานยังไง

เรียกต่อ: Data(), data(). สร้างออบเจ็กต์: RemoteChatSession.Data. คืนค่า: new RemoteChatSession.Data(this.sessionId, this.profilePublicKey.data()).

Parameters

  • ไม่มี

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

RemoteChatSession instance = ...;
RemoteChatSession.Data result = instance.asData();

net.minecraft.network.chat.RemoteChatSession#createMessageDecoder(UUID)

  • Origin: common
  • Source: net/minecraft/network/chat/RemoteChatSession.java:15
  • Modifiers: public
  • Return: SignedMessageChain.Decoder

คืออะไร

สร้าง Message Decoder

ทำงานยังไง

เรียกต่อ: decoder(). สร้างออบเจ็กต์: SignedMessageChain. คืนค่า: new SignedMessageChain(uUID, this.sessionId).decoder(this.profilePublicKey).

Parameters

  • UUID uUID

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

RemoteChatSession instance = ...;
UUID uUID = ...;
SignedMessageChain.Decoder result = instance.createMessageDecoder(uUID);

net.minecraft.network.chat.RemoteChatSession#createMessageValidator(Duration)

  • Origin: common
  • Source: net/minecraft/network/chat/RemoteChatSession.java:11
  • Modifiers: public
  • Return: SignedMessageValidator

คืออะไร

สร้าง Message Validator

ทำงานยังไง

เรียกต่อ: KeyBased(), createSignatureValidator(), data(), hasExpired(). สร้างออบเจ็กต์: SignedMessageValidator.KeyBased. คืนค่า: new SignedMessageValidator.KeyBased(this.profilePublicKey.createSignatureValidator(), () -> this.profilePublicKey.data().hasExpired(duration)).

Parameters

  • Duration duration

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

RemoteChatSession instance = ...;
Duration duration = ...;
SignedMessageValidator result = instance.createMessageValidator(duration);

net.minecraft.network.chat.RemoteChatSession#hasExpired()

  • Origin: common
  • Source: net/minecraft/network/chat/RemoteChatSession.java:23
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: data(). คืนค่า: this.profilePublicKey.data().hasExpired().

Parameters

  • ไม่มี

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

RemoteChatSession instance = ...;
boolean result = instance.hasExpired();

RemoteChatSession$Data

  • Full name: net.minecraft.network.chat.RemoteChatSession$Data
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/RemoteChatSession.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.RemoteChatSession$Data#read(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/RemoteChatSession.java:28
  • Modifiers: public static
  • Return: RemoteChatSession.Data

คืออะไร

อ่าน read

ทำงานยังไง

เรียกต่อ: Data(), readUUID(). สร้างออบเจ็กต์: RemoteChatSession.Data, ProfilePublicKey.Data. คืนค่า: new RemoteChatSession.Data(friendlyByteBuf.readUUID(), new ProfilePublicKey.Data(friendlyByteBuf)).

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

FriendlyByteBuf friendlyByteBuf = ...;
RemoteChatSession.Data result = RemoteChatSession.Data.read(friendlyByteBuf);

net.minecraft.network.chat.RemoteChatSession$Data#validate(GameProfile,SignatureValidator)

  • Origin: common
  • Source: net/minecraft/network/chat/RemoteChatSession.java:37
  • Modifiers: public
  • Return: RemoteChatSession

คืออะไร

ตรวจสอบความถูกต้อง validate

ทำงานยังไง

เรียกต่อ: createValidated(), getId(). สร้างออบเจ็กต์: RemoteChatSession. คืนค่า: new RemoteChatSession(this.sessionId, ProfilePublicKey.createValidated(signatureValidator, gameProfile.getId(), this.profilePublicKey)).

Parameters

  • GameProfile gameProfile
  • SignatureValidator signatureValidator

Throws

  • ProfilePublicKey.ValidationException

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

RemoteChatSession.Data instance = ...;
GameProfile gameProfile = ...;
SignatureValidator signatureValidator = ...;
RemoteChatSession result = instance.validate(gameProfile, signatureValidator);

net.minecraft.network.chat.RemoteChatSession$Data#write(FriendlyByteBuf,RemoteChatSession.Data)

  • Origin: common
  • Source: net/minecraft/network/chat/RemoteChatSession.java:32
  • Modifiers: public static
  • Return: void

คืออะไร

เขียน write

ทำงานยังไง

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

Parameters

  • FriendlyByteBuf friendlyByteBuf
  • RemoteChatSession.Data data

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

FriendlyByteBuf friendlyByteBuf = ...;
RemoteChatSession.Data data = ...;
RemoteChatSession.Data.write(friendlyByteBuf, data);

SignableCommand

  • Full name: net.minecraft.network.chat.SignableCommand
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignableCommand.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.SignableCommand#getArgument(String)

  • Origin: common
  • Source: net/minecraft/network/chat/SignableCommand.java:49
  • Modifiers: public
  • Return: SignableCommand.Argument<S>

คืออะไร

อ่านค่า Argument

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: equals(), name(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • String string

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

SignableCommand instance = ...;
SignableCommand.Argument<S> result = instance.getArgument("value");

net.minecraft.network.chat.SignableCommand#hasSignableArguments(ParseResults<S>)

  • Origin: common
  • Source: net/minecraft/network/chat/SignableCommand.java:14
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Signable Arguments

ทำงานยังไง

เรียกต่อ: of(), arguments(), isEmpty(). คืนค่า: !of(parseResults).arguments().isEmpty().

Parameters

  • ParseResults<S> parseResults

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

ParseResults<S> parseResults = ...;
boolean result = SignableCommand.hasSignableArguments(parseResults);

net.minecraft.network.chat.SignableCommand#of(ParseResults<S>)

  • Origin: common
  • Source: net/minecraft/network/chat/SignableCommand.java:18
  • Modifiers: public static
  • Return: SignableCommand<S>

คืออะไร

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

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getReader(), getString(), getContext(), collectArguments(), getChild(), getRootNode(), addAll(). สร้างออบเจ็กต์: SignableCommand<>. คืนค่า: new SignableCommand<>(list).

Parameters

  • ParseResults<S> parseResults

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

ParseResults<S> parseResults = ...;
SignableCommand<S> result = SignableCommand.of(parseResults);

SignableCommand$Argument

  • Full name: net.minecraft.network.chat.SignableCommand$Argument
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignableCommand.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.SignableCommand$Argument#name()

  • Origin: common
  • Source: net/minecraft/network/chat/SignableCommand.java:61
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ name ตาม implementation ของ SignableCommand$Argument

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SignableCommand.Argument instance = ...;
String result = instance.name();

SignedMessageBody

  • Full name: net.minecraft.network.chat.SignedMessageBody
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageBody.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.SignedMessageBody#pack(MessageSignatureCache)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageBody.java:40
  • Modifiers: public
  • Return: SignedMessageBody.Packed

คืออะไร

ดำเนินการ pack ตาม implementation ของ SignedMessageBody

ทำงานยังไง

เรียกต่อ: Packed(). สร้างออบเจ็กต์: SignedMessageBody.Packed. คืนค่า: new SignedMessageBody.Packed(this.content, this.timeStamp, this.salt, this.lastSeen.pack(messageSignatureCache)).

Parameters

  • MessageSignatureCache messageSignatureCache

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

SignedMessageBody instance = ...;
MessageSignatureCache messageSignatureCache = ...;
SignedMessageBody.Packed result = instance.pack(messageSignatureCache);

net.minecraft.network.chat.SignedMessageBody#unsigned(String)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageBody.java:27
  • Modifiers: public static
  • Return: SignedMessageBody

คืออะไร

ดำเนินการ unsigned ตาม implementation ของ SignedMessageBody

ทำงานยังไง

เรียกต่อ: now(). สร้างออบเจ็กต์: SignedMessageBody. คืนค่า: new SignedMessageBody(string, Instant.now(), 0L, LastSeenMessages.EMPTY).

Parameters

  • String string

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

SignedMessageBody result = SignedMessageBody.unsigned("value");

net.minecraft.network.chat.SignedMessageBody#updateSignature(SignatureUpdater.Output)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageBody.java:31
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Signature

ทำงานยังไง

เรียกต่อ: update(), toByteArray(), getEpochSecond(), getBytes().

Parameters

  • SignatureUpdater.Output output

Throws

  • SignatureException

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

SignedMessageBody instance = ...;
SignatureUpdater.Output output = ...;
instance.updateSignature(output);

SignedMessageBody$Packed

  • Full name: net.minecraft.network.chat.SignedMessageBody$Packed
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageBody.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.SignedMessageBody$Packed#Packed(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageBody.java:45
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: readUtf(), readInstant(), readLong(). สร้างออบเจ็กต์: LastSeenMessages.Packed.

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

FriendlyByteBuf friendlyByteBuf = ...;
SignedMessageBody.Packed instance = new SignedMessageBody.Packed(friendlyByteBuf);

net.minecraft.network.chat.SignedMessageBody$Packed#unpack(MessageSignatureCache)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageBody.java:56
  • Modifiers: public
  • Return: Optional<SignedMessageBody>

คืออะไร

ดำเนินการ unpack ตาม implementation ของ SignedMessageBody$Packed

ทำงานยังไง

เรียกต่อ: map(). สร้างออบเจ็กต์: SignedMessageBody. คืนค่า: this.lastSeen.unpack(messageSignatureCache).map(lastSeenMessages -> new SignedMessageBody(this.content, this.timeStamp, this.salt, lastSeenMessages)).

Parameters

  • MessageSignatureCache messageSignatureCache

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

SignedMessageBody.Packed instance = ...;
MessageSignatureCache messageSignatureCache = ...;
Optional<SignedMessageBody> result = instance.unpack(messageSignatureCache);

net.minecraft.network.chat.SignedMessageBody$Packed#write(FriendlyByteBuf)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageBody.java:49
  • Modifiers: public
  • Return: void

คืออะไร

เขียน write

ทำงานยังไง

เรียกต่อ: writeUtf(), writeInstant(), writeLong().

Parameters

  • FriendlyByteBuf friendlyByteBuf

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

SignedMessageBody.Packed instance = ...;
FriendlyByteBuf friendlyByteBuf = ...;
instance.write(friendlyByteBuf);

SignedMessageChain

  • Full name: net.minecraft.network.chat.SignedMessageChain
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageChain.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.SignedMessageChain#decoder(ProfilePublicKey)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:35
  • Modifiers: public
  • Return: SignedMessageChain.Decoder

คืออะไร

ดำเนินการ decoder ตาม implementation ของ SignedMessageChain

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastTimeStamp, nextLink. เรียกต่อ: createSignatureValidator(), Decoder(), unpack(), DecodeException(), data(), hasExpired(), timeStamp(), isBefore(). สร้างออบเจ็กต์: SignedMessageChain.Decoder, SignedMessageChain.DecodeException, PlayerChatMessage. คืนค่า: playerChatMessage.

Parameters

  • ProfilePublicKey profilePublicKey

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

SignedMessageChain instance = ...;
ProfilePublicKey profilePublicKey = ...;
SignedMessageChain.Decoder result = instance.decoder(profilePublicKey);

net.minecraft.network.chat.SignedMessageChain#encoder(Signer)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:23
  • Modifiers: public
  • Return: SignedMessageChain.Encoder

คืออะไร

ดำเนินการ encoder ตาม implementation ของ SignedMessageChain

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: nextLink. เรียกต่อ: advance(), sign(), updateSignature(). สร้างออบเจ็กต์: MessageSignature. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Signer signer

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

SignedMessageChain instance = ...;
Signer signer = ...;
SignedMessageChain.Encoder result = instance.encoder(signer);

net.minecraft.network.chat.SignedMessageChain#SignedMessageChain(UUID,UUID)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: nextLink. เรียกต่อ: root().

Parameters

  • UUID uUID
  • UUID uUID2

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

UUID uUID = ...;
UUID uUID2 = ...;
SignedMessageChain instance = new SignedMessageChain(uUID, uUID2);

SignedMessageChain$DecodeException

  • Full name: net.minecraft.network.chat.SignedMessageChain$DecodeException
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageChain.java
  • Type: class
  • Modifiers: public static
  • Extends: ThrowingComponent

net.minecraft.network.chat.SignedMessageChain$DecodeException#DecodeException(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:87
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Component component

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

Component component = ...;
SignedMessageChain.DecodeException instance = new SignedMessageChain.DecodeException(component);

SignedMessageChain$Decoder

  • Full name: net.minecraft.network.chat.SignedMessageChain$Decoder
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageChain.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.SignedMessageChain$Decoder#setChainBroken()

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:106
  • Modifiers: default
  • Return: void

คืออะไร

กำหนดค่า Chain Broken

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

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

SignedMessageChain.Decoder instance = ...;
instance.setChainBroken();

net.minecraft.network.chat.SignedMessageChain$Decoder#unpack(MessageSignature,SignedMessageBody)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:104
  • Modifiers: ``
  • Return: PlayerChatMessage

คืออะไร

ดำเนินการ unpack ตาม implementation ของ SignedMessageChain$Decoder

ทำงานยังไง

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

Parameters

  • MessageSignature messageSignature
  • SignedMessageBody signedMessageBody

Throws

  • SignedMessageChain.DecodeException

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

SignedMessageChain.Decoder instance = ...;
MessageSignature messageSignature = ...;
SignedMessageBody signedMessageBody = ...;
PlayerChatMessage result = instance.unpack(messageSignature, signedMessageBody);

net.minecraft.network.chat.SignedMessageChain$Decoder#unsigned(UUID,BooleanSupplier)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:94
  • Modifiers: static
  • Return: SignedMessageChain.Decoder

คืออะไร

ดำเนินการ unsigned ตาม implementation ของ SignedMessageChain$Decoder

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAsBoolean(), DecodeException(), content(). สร้างออบเจ็กต์: SignedMessageChain.DecodeException. คืนค่า: PlayerChatMessage.unsigned(uUID, signedMessageBody.content()).

Parameters

  • UUID uUID
  • BooleanSupplier booleanSupplier

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

UUID uUID = ...;
BooleanSupplier booleanSupplier = ...;
SignedMessageChain.Decoder result = SignedMessageChain.Decoder.unsigned(uUID, booleanSupplier);

SignedMessageChain$Encoder

  • Full name: net.minecraft.network.chat.SignedMessageChain$Encoder
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageChain.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.SignedMessageChain$Encoder#pack(SignedMessageBody)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageChain.java:114
  • Modifiers: ``
  • Return: MessageSignature

คืออะไร

ดำเนินการ pack ตาม implementation ของ SignedMessageChain$Encoder

ทำงานยังไง

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

Parameters

  • SignedMessageBody signedMessageBody

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

SignedMessageChain.Encoder instance = ...;
SignedMessageBody signedMessageBody = ...;
MessageSignature result = instance.pack(signedMessageBody);

SignedMessageLink

  • Full name: net.minecraft.network.chat.SignedMessageLink
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageLink.java
  • Type: record
  • Modifiers: public

net.minecraft.network.chat.SignedMessageLink#advance()

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageLink.java:42
  • Modifiers: public
  • Return: SignedMessageLink

คืออะไร

ดำเนินการ advance ตาม implementation ของ SignedMessageLink

ทำงานยังไง

แก้ state: index. สร้างออบเจ็กต์: SignedMessageLink. คืนค่า: this.index == Integer.MAX_VALUE ? null : new SignedMessageLink(this.index + 1, this.sender, this.sessionId).

Parameters

  • ไม่มี

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

SignedMessageLink instance = ...;
SignedMessageLink result = instance.advance();

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageLink.java:38
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Descendant Of

ทำงานยังไง

เรียกต่อ: index(), equals(), sender(), sessionId(). คืนค่า: this.index > signedMessageLink.index() && this.sender.equals(signedMessageLink.sender()) && this.sessionId.equals(signedMessageLink.sessionId()).

Parameters

  • SignedMessageLink signedMessageLink

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

SignedMessageLink instance = ...;
SignedMessageLink signedMessageLink = ...;
boolean result = instance.isDescendantOf(signedMessageLink);

net.minecraft.network.chat.SignedMessageLink#root(UUID,UUID)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageLink.java:28
  • Modifiers: public static
  • Return: SignedMessageLink

คืออะไร

ดำเนินการ root ตาม implementation ของ SignedMessageLink

ทำงานยังไง

สร้างออบเจ็กต์: SignedMessageLink. คืนค่า: new SignedMessageLink(0, uUID, uUID2).

Parameters

  • UUID uUID
  • UUID uUID2

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

UUID uUID = ...;
UUID uUID2 = ...;
SignedMessageLink result = SignedMessageLink.root(uUID, uUID2);

net.minecraft.network.chat.SignedMessageLink#unsigned(UUID)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageLink.java:24
  • Modifiers: public static
  • Return: SignedMessageLink

คืออะไร

ดำเนินการ unsigned ตาม implementation ของ SignedMessageLink

ทำงานยังไง

เรียกต่อ: root(). คืนค่า: root(uUID, Util.NIL_UUID).

Parameters

  • UUID uUID

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

UUID uUID = ...;
SignedMessageLink result = SignedMessageLink.unsigned(uUID);

net.minecraft.network.chat.SignedMessageLink#updateSignature(SignatureUpdater.Output)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageLink.java:32
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Signature

ทำงานยังไง

เรียกต่อ: update(), uuidToByteArray(), toByteArray().

Parameters

  • SignatureUpdater.Output output

Throws

  • SignatureException

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

SignedMessageLink instance = ...;
SignatureUpdater.Output output = ...;
instance.updateSignature(output);

SignedMessageValidator

  • Full name: net.minecraft.network.chat.SignedMessageValidator
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SignedMessageValidator.java
  • Type: interface
  • Modifiers: public

net.minecraft.network.chat.SignedMessageValidator#updateAndValidate(PlayerChatMessage)

  • Origin: common
  • Source: net/minecraft/network/chat/SignedMessageValidator.java:18
  • Modifiers: ``
  • Return: PlayerChatMessage

คืออะไร

อัปเดต And Validate

ทำงานยังไง

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

Parameters

  • PlayerChatMessage playerChatMessage

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

SignedMessageValidator instance = ...;
PlayerChatMessage playerChatMessage = ...;
PlayerChatMessage result = instance.updateAndValidate(playerChatMessage);

Style

  • Full name: net.minecraft.network.chat.Style
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/Style.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.Style#applyFormat(ChatFormatting)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:392
  • Modifiers: public
  • Return: Style

คืออะไร

นำไปใช้ Format

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: fromLegacyFormat(). สร้างออบเจ็กต์: Style. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ChatFormatting chatFormatting

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

Style instance = ...;
ChatFormatting chatFormatting = ...;
Style result = instance.applyFormat(chatFormatting);

net.minecraft.network.chat.Style#applyFormats(ChatFormatting[])

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:461
  • Modifiers: public
  • Return: Style

คืออะไร

นำไปใช้ Formats

ทำงานยังไง

แยกกรณีด้วย switch ; มีการวนลูป. เรียกต่อ: fromLegacyFormat(). สร้างออบเจ็กต์: Style. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ChatFormatting[] chatFormattings

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

Style instance = ...;
ChatFormatting[] chatFormattings = ...;
Style result = instance.applyFormats(chatFormattings);

net.minecraft.network.chat.Style#applyLegacyFormat(ChatFormatting)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:424
  • Modifiers: public
  • Return: Style

คืออะไร

นำไปใช้ Legacy Format

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: fromLegacyFormat(). สร้างออบเจ็กต์: Style. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ChatFormatting chatFormatting

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

Style instance = ...;
ChatFormatting chatFormatting = ...;
Style result = instance.applyLegacyFormat(chatFormatting);

net.minecraft.network.chat.Style#applyTo(Style)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:496
  • Modifiers: public
  • Return: Style

คืออะไร

นำไปใช้ To

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. สร้างออบเจ็กต์: Style. คืนค่า: style.

Parameters

  • Style style

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

Style instance = ...;
Style style = ...;
Style result = instance.applyTo(style);

net.minecraft.network.chat.Style#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:570
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: bold, italic, obfuscated, strikethrough, underlined. เรียกต่อ: getColor(), getShadowColor(). คืนค่า: true.

Parameters

  • Object object

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

Style instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.Style#getClickEvent()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:131
  • Modifiers: public
  • Return: ClickEvent

คืออะไร

อ่านค่า Click Event

ทำงานยังไง

คืนค่า: this.clickEvent.

Parameters

  • ไม่มี

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

Style instance = ...;
ClickEvent result = instance.getClickEvent();

net.minecraft.network.chat.Style#getColor()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:97
  • Modifiers: public
  • Return: TextColor

คืออะไร

อ่านค่า Color

ทำงานยังไง

คืนค่า: this.color.

Parameters

  • ไม่มี

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

Style instance = ...;
TextColor result = instance.getColor();

net.minecraft.network.chat.Style#getFont()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:146
  • Modifiers: public
  • Return: ResourceLocation

คืออะไร

อ่านค่า Font

ทำงานยังไง

คืนค่า: this.font != null ? this.font : DEFAULT_FONT.

Parameters

  • ไม่มี

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

Style instance = ...;
ResourceLocation result = instance.getFont();

net.minecraft.network.chat.Style#getHoverEvent()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:136
  • Modifiers: public
  • Return: HoverEvent

คืออะไร

อ่านค่า Hover Event

ทำงานยังไง

คืนค่า: this.hoverEvent.

Parameters

  • ไม่มี

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

Style instance = ...;
HoverEvent result = instance.getHoverEvent();

net.minecraft.network.chat.Style#getInsertion()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:141
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Insertion

ทำงานยังไง

คืนค่า: this.insertion.

Parameters

  • ไม่มี

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

Style instance = ...;
String result = instance.getInsertion();

net.minecraft.network.chat.Style#getShadowColor()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:102
  • Modifiers: public
  • Return: Integer

คืออะไร

อ่านค่า Shadow Color

ทำงานยังไง

คืนค่า: this.shadowColor.

Parameters

  • ไม่มี

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

Style instance = ...;
Integer result = instance.getShadowColor();

net.minecraft.network.chat.Style#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:591
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ Style

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Style instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.Style#isBold()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:107
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: bold. คืนค่า: this.bold == Boolean.TRUE.

Parameters

  • ไม่มี

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

Style instance = ...;
boolean result = instance.isBold();

net.minecraft.network.chat.Style#isEmpty()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:127
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this == EMPTY.

Parameters

  • ไม่มี

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

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

net.minecraft.network.chat.Style#isItalic()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:111
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: italic. คืนค่า: this.italic == Boolean.TRUE.

Parameters

  • ไม่มี

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

Style instance = ...;
boolean result = instance.isItalic();

net.minecraft.network.chat.Style#isObfuscated()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:123
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: obfuscated. คืนค่า: this.obfuscated == Boolean.TRUE.

Parameters

  • ไม่มี

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

Style instance = ...;
boolean result = instance.isObfuscated();

net.minecraft.network.chat.Style#isStrikethrough()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:115
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: strikethrough. คืนค่า: this.strikethrough == Boolean.TRUE.

Parameters

  • ไม่มี

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

Style instance = ...;
boolean result = instance.isStrikethrough();

net.minecraft.network.chat.Style#isUnderlined()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:119
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: underlined. คืนค่า: this.underlined == Boolean.TRUE.

Parameters

  • ไม่มี

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

Style instance = ...;
boolean result = instance.isUnderlined();

net.minecraft.network.chat.Style#toString()

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:518
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ Style

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: isNotFirst. เรียกต่อ: prependSeparator(), append(), addFlagString(), addValueString(). สร้างออบเจ็กต์: StringBuilder, Collector. คืนค่า: stringBuilder.toString().

Parameters

  • ไม่มี

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

Style instance = ...;
String result = instance.toString();

net.minecraft.network.chat.Style#withBold(Boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:194
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withBold ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • Boolean boolean_

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

Style instance = ...;
Boolean boolean_ = ...;
Style result = instance.withBold(boolean_);

net.minecraft.network.chat.Style#withClickEvent(ClickEvent)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:304
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withClickEvent ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • ClickEvent clickEvent

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

Style instance = ...;
ClickEvent clickEvent = ...;
Style result = instance.withClickEvent(clickEvent);

net.minecraft.network.chat.Style#withColor(ChatFormatting)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:176
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withColor ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: fromLegacyFormat(). คืนค่า: this.withColor(chatFormatting != null ? TextColor.fromLegacyFormat(chatFormatting) : null).

Parameters

  • ChatFormatting chatFormatting

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

Style instance = ...;
ChatFormatting chatFormatting = ...;
Style result = instance.withColor(chatFormatting);

net.minecraft.network.chat.Style#withColor(int)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:180
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withColor ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: fromRgb(). คืนค่า: this.withColor(TextColor.fromRgb(i)).

Parameters

  • int i

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

Style instance = ...;
Style result = instance.withColor(0);

net.minecraft.network.chat.Style#withColor(TextColor)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:154
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withColor ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • TextColor textColor

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

Style instance = ...;
TextColor textColor = ...;
Style result = instance.withColor(textColor);

net.minecraft.network.chat.Style#withFont(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:370
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withFont ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • ResourceLocation resourceLocation

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

Style instance = ...;
ResourceLocation resourceLocation = ...;
Style result = instance.withFont(resourceLocation);

net.minecraft.network.chat.Style#withHoverEvent(HoverEvent)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:326
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withHoverEvent ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • HoverEvent hoverEvent

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

Style instance = ...;
HoverEvent hoverEvent = ...;
Style result = instance.withHoverEvent(hoverEvent);

net.minecraft.network.chat.Style#withInsertion(String)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:348
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withInsertion ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • String string

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

Style instance = ...;
Style result = instance.withInsertion("value");

net.minecraft.network.chat.Style#withItalic(Boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:216
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withItalic ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • Boolean boolean_

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

Style instance = ...;
Boolean boolean_ = ...;
Style result = instance.withItalic(boolean_);

net.minecraft.network.chat.Style#withObfuscated(Boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:282
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withObfuscated ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • Boolean boolean_

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

Style instance = ...;
Boolean boolean_ = ...;
Style result = instance.withObfuscated(boolean_);

net.minecraft.network.chat.Style#withShadowColor(int)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:184
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withShadowColor ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • int i

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

Style instance = ...;
Style result = instance.withShadowColor(0);

net.minecraft.network.chat.Style#withStrikethrough(Boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:260
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withStrikethrough ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • Boolean boolean_

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

Style instance = ...;
Boolean boolean_ = ...;
Style result = instance.withStrikethrough(boolean_);

net.minecraft.network.chat.Style#withUnderlined(Boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/Style.java:238
  • Modifiers: public
  • Return: Style

คืออะไร

ดำเนินการ withUnderlined ตาม implementation ของ Style

ทำงานยังไง

เรียกต่อ: equals(), checkEmptyAfterChange(). สร้างออบเจ็กต์: Style.

Parameters

  • Boolean boolean_

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

Style instance = ...;
Boolean boolean_ = ...;
Style result = instance.withUnderlined(boolean_);

SubStringSource

  • Full name: net.minecraft.network.chat.SubStringSource
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/SubStringSource.java
  • Type: class
  • Modifiers: public

net.minecraft.network.chat.SubStringSource#create(FormattedText)

  • Origin: common
  • Source: net/minecraft/network/chat/SubStringSource.java:55
  • Modifiers: public static
  • Return: SubStringSource

คืออะไร

สร้าง create

ทำงานยังไง

คืนค่า: create(formattedText, i -> i, string -> string).

Parameters

  • FormattedText formattedText

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

FormattedText formattedText = ...;
SubStringSource result = SubStringSource.create(formattedText);

net.minecraft.network.chat.SubStringSource#create(FormattedText,Int2IntFunction,UnaryOperator<String>)

  • Origin: common
  • Source: net/minecraft/network/chat/SubStringSource.java:59
  • Modifiers: public static
  • Return: SubStringSource

คืออะไร

สร้าง create

ทำงานยังไง

มีการวนลูป. เรียกต่อ: newArrayList(), visit(), iterateFormatted(), appendCodePoint(), charCount(), add(), empty(), apply(). สร้างออบเจ็กต์: StringBuilder, SubStringSource. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • FormattedText formattedText
  • Int2IntFunction int2IntFunction
  • UnaryOperator<String> unaryOperator

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

FormattedText formattedText = ...;
Int2IntFunction int2IntFunction = ...;
UnaryOperator<String> unaryOperator = ...;
SubStringSource result = SubStringSource.create(formattedText, int2IntFunction, unaryOperator);

net.minecraft.network.chat.SubStringSource#getPlainText()

  • Origin: common
  • Source: net/minecraft/network/chat/SubStringSource.java:23
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Plain Text

ทำงานยังไง

คืนค่า: this.plainText.

Parameters

  • ไม่มี

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

SubStringSource instance = ...;
String result = instance.getPlainText();

net.minecraft.network.chat.SubStringSource#substring(int,int,boolean)

  • Origin: common
  • Source: net/minecraft/network/chat/SubStringSource.java:27
  • Modifiers: public
  • Return: List<FormattedCharSequence>

คืออะไร

ดำเนินการ substring ตาม implementation ของ SubStringSource

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: of(), newArrayList(), get(), equals(), add(), backward(), forward(), reverse(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • int i
  • int j
  • boolean bl

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

SubStringSource instance = ...;
List<FormattedCharSequence> result = instance.substring(0, 0, true);

TextColor

  • Full name: net.minecraft.network.chat.TextColor
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/TextColor.java
  • Type: class
  • Modifiers: public final

net.minecraft.network.chat.TextColor#equals(Object)

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:50
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: value. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Object object

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

TextColor instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.network.chat.TextColor#formatValue()

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:46
  • Modifiers: public final
  • Return: String

คืออะไร

ดำเนินการ formatValue ตาม implementation ของ TextColor

ทำงานยังไง

เรียกต่อ: format(). คืนค่า: String.format(Locale.ROOT, "#%06X", this.value).

Parameters

  • ไม่มี

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

TextColor instance = ...;
String result = instance.formatValue();

net.minecraft.network.chat.TextColor#fromLegacyFormat(ChatFormatting)

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:72
  • Modifiers: public static
  • Return: TextColor

คืออะไร

ดำเนินการ fromLegacyFormat ตาม implementation ของ TextColor

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: LEGACY_FORMAT_TO_COLOR.get(chatFormatting).

Parameters

  • ChatFormatting chatFormatting

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

ChatFormatting chatFormatting = ...;
TextColor result = TextColor.fromLegacyFormat(chatFormatting);

net.minecraft.network.chat.TextColor#fromRgb(int)

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:77
  • Modifiers: public static
  • Return: TextColor

คืออะไร

ดำเนินการ fromRgb ตาม implementation ของ TextColor

ทำงานยังไง

สร้างออบเจ็กต์: TextColor. คืนค่า: new TextColor(i).

Parameters

  • int i

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

TextColor result = TextColor.fromRgb(0);

net.minecraft.network.chat.TextColor#getValue()

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:38
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Value

ทำงานยังไง

คืนค่า: this.value.

Parameters

  • ไม่มี

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

TextColor instance = ...;
int result = instance.getValue();

net.minecraft.network.chat.TextColor#hashCode()

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:62
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ TextColor

ทำงานยังไง

เรียกต่อ: hash(). คืนค่า: Objects.hash(this.value, this.name).

Parameters

  • ไม่มี

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

TextColor instance = ...;
int result = instance.hashCode();

net.minecraft.network.chat.TextColor#parseColor(String)

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:81
  • Modifiers: public static
  • Return: DataResult<TextColor>

คืออะไร

แปลง/วิเคราะห์ข้อมูล Color

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: startsWith(), parseInt(), substring(), success(), fromRgb(), stable(), error(), get(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • String string

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

DataResult<TextColor> result = TextColor.parseColor("value");

net.minecraft.network.chat.TextColor#serialize()

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:42
  • Modifiers: public
  • Return: String

คืออะไร

แปลงเป็นข้อมูลสำหรับบันทึก/ส่ง serialize

ทำงานยังไง

เรียกต่อ: formatValue(). คืนค่า: this.name != null ? this.name : this.formatValue().

Parameters

  • ไม่มี

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

TextColor instance = ...;
String result = instance.serialize();

net.minecraft.network.chat.TextColor#toString()

  • Origin: common
  • Source: net/minecraft/network/chat/TextColor.java:67
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ TextColor

ทำงานยังไง

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

Parameters

  • ไม่มี

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

TextColor instance = ...;
String result = instance.toString();

ThrowingComponent

  • Full name: net.minecraft.network.chat.ThrowingComponent
  • Package: net.minecraft.network.chat
  • Source: commonnet/minecraft/network/chat/ThrowingComponent.java
  • Type: class
  • Modifiers: public
  • Extends: Exception

net.minecraft.network.chat.ThrowingComponent#getComponent()

  • Origin: common
  • Source: net/minecraft/network/chat/ThrowingComponent.java:16
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Component

ทำงานยังไง

คืนค่า: this.component.

Parameters

  • ไม่มี

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

ThrowingComponent instance = ...;
Component result = instance.getComponent();

net.minecraft.network.chat.ThrowingComponent#ThrowingComponent(Component)

  • Origin: common
  • Source: net/minecraft/network/chat/ThrowingComponent.java:6
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: component. เรียกต่อ: getString().

Parameters

  • Component component

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

Component component = ...;
ThrowingComponent instance = new ThrowingComponent(component);

net.minecraft.network.chat.ThrowingComponent#ThrowingComponent(Component,Throwable)

  • Origin: common
  • Source: net/minecraft/network/chat/ThrowingComponent.java:11
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: component. เรียกต่อ: getString().

Parameters

  • Component component
  • Throwable throwable

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

Component component = ...;
Throwable throwable = ...;
ThrowingComponent instance = new ThrowingComponent(component, throwable);