Skip to content

Package net.minecraft

Part 1/1


BlockUtil

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

net.minecraft.BlockUtil#getLargestRectangleAround(BlockPos,Direction.Axis,int,Direction.Axis,int,Predicate<BlockPos>)

  • Origin: common
  • Source: net/minecraft/BlockUtil.java:16
  • Modifiers: public static
  • Return: BlockUtil.FoundRectangle

คืออะไร

อ่านค่า Largest Rectangle Around

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: mutable(), get(), getOpposite(), getLimit(), set(), IntBounds(), move(), getMaxRectangleLocation(). สร้างออบเจ็กต์: BlockUtil.IntBounds, BlockUtil.FoundRectangle. คืนค่า: new BlockUtil.FoundRectangle(blockPos.relative(axis, o - m).relative(axis2, p - n), q, r).

Parameters

  • BlockPos blockPos
  • Direction.Axis axis
  • int i
  • Direction.Axis axis2
  • int j
  • Predicate<BlockPos> predicate

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

BlockPos blockPos = ...;
Direction.Axis axis = ...;
Direction.Axis axis2 = ...;
Predicate<BlockPos> predicate = ...;
BlockUtil.FoundRectangle result = BlockUtil.getLargestRectangleAround(blockPos, axis, 0, axis2, 0, predicate);

net.minecraft.BlockUtil#getTopConnectedBlock(BlockGetter,BlockPos,Block,Direction,Block)

  • Origin: common
  • Source: net/minecraft/BlockUtil.java:123
  • Modifiers: public static
  • Return: Optional<BlockPos>

คืออะไร

อ่านค่า Top Connected Block

ทำงานยังไง

มีการวนลูป. เรียกต่อ: mutable(), move(), getBlockState(), is(), of(), empty(). คืนค่า: blockState.is(block2) ? Optional.of(mutableBlockPos) : Optional.empty().

Parameters

  • BlockGetter blockGetter
  • BlockPos blockPos
  • Block block
  • Direction direction
  • Block block2

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

BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Block block = ...;
Direction direction = ...;
Block block2 = ...;
Optional<BlockPos> result = BlockUtil.getTopConnectedBlock(blockGetter, blockPos, block, direction, block2);

BlockUtil$FoundRectangle

  • Full name: net.minecraft.BlockUtil$FoundRectangle
  • Package: net.minecraft
  • Source: commonnet/minecraft/BlockUtil.java
  • Type: class
  • Modifiers: public static

net.minecraft.BlockUtil$FoundRectangle#FoundRectangle(BlockPos,int,int)

  • Origin: common
  • Source: net/minecraft/BlockUtil.java:140
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: minCorner, axis1Size, axis2Size.

Parameters

  • BlockPos blockPos
  • int i
  • int j

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

BlockPos blockPos = ...;
BlockUtil.FoundRectangle instance = new BlockUtil.FoundRectangle(blockPos, 0, 0);

BlockUtil$IntBounds

  • Full name: net.minecraft.BlockUtil$IntBounds
  • Package: net.minecraft
  • Source: commonnet/minecraft/BlockUtil.java
  • Type: class
  • Modifiers: public static

net.minecraft.BlockUtil$IntBounds#IntBounds(int,int)

  • Origin: common
  • Source: net/minecraft/BlockUtil.java:151
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: min, max.

Parameters

  • int i
  • int j

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

BlockUtil.IntBounds instance = new BlockUtil.IntBounds(0, 0);

net.minecraft.BlockUtil$IntBounds#toString()

  • Origin: common
  • Source: net/minecraft/BlockUtil.java:156
  • Modifiers: public
  • Return: String

คืออะไร

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

ทำงานยังไง

คืนค่า: "IntBounds{min=" + this.min + ", max=" + this.max + "}".

Parameters

  • ไม่มี

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

BlockUtil.IntBounds instance = ...;
String result = instance.toString();

CharPredicate

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

net.minecraft.CharPredicate#and(CharPredicate)

  • Origin: common
  • Source: net/minecraft/CharPredicate.java:9
  • Modifiers: default
  • Return: CharPredicate

คืออะไร

ดำเนินการ and ตาม implementation ของ CharPredicate

ทำงานยังไง

เรียกต่อ: requireNonNull(), test(). คืนค่า: c -> this.test(c) && charPredicate.test(c).

Parameters

  • CharPredicate charPredicate

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

CharPredicate instance = ...;
CharPredicate charPredicate = ...;
CharPredicate result = instance.and(charPredicate);

net.minecraft.CharPredicate#negate()

  • Origin: common
  • Source: net/minecraft/CharPredicate.java:14
  • Modifiers: default
  • Return: CharPredicate

คืออะไร

ดำเนินการ negate ตาม implementation ของ CharPredicate

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: c -> !this.test(c).

Parameters

  • ไม่มี

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

CharPredicate instance = ...;
CharPredicate result = instance.negate();

net.minecraft.CharPredicate#or(CharPredicate)

  • Origin: common
  • Source: net/minecraft/CharPredicate.java:18
  • Modifiers: default
  • Return: CharPredicate

คืออะไร

ดำเนินการ or ตาม implementation ของ CharPredicate

ทำงานยังไง

เรียกต่อ: requireNonNull(), test(). คืนค่า: c -> this.test(c) || charPredicate.test(c).

Parameters

  • CharPredicate charPredicate

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

CharPredicate instance = ...;
CharPredicate charPredicate = ...;
CharPredicate result = instance.or(charPredicate);

net.minecraft.CharPredicate#test(char)

  • Origin: common
  • Source: net/minecraft/CharPredicate.java:7
  • Modifiers: ``
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

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

Parameters

  • char c

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

CharPredicate instance = ...;
boolean result = instance.test('a');

ChatFormatting

  • Full name: net.minecraft.ChatFormatting
  • Package: net.minecraft
  • Source: commonnet/minecraft/ChatFormatting.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.ChatFormatting#getByCode(char)

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:130
  • Modifiers: public static
  • Return: ChatFormatting

คืออะไร

อ่านค่า By Code

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: toLowerCase(), values(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • char c

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

ChatFormatting result = ChatFormatting.getByCode('a');

net.minecraft.ChatFormatting#getById(int)

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:115
  • Modifiers: public static
  • Return: ChatFormatting

คืออะไร

อ่านค่า By Id

ทำงานยังไง

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

Parameters

  • int i

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

ChatFormatting result = ChatFormatting.getById(0);

net.minecraft.ChatFormatting#getByName(String)

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:110
  • Modifiers: public static
  • Return: ChatFormatting

คืออะไร

อ่านค่า By Name

ทำงานยังไง

เรียกต่อ: get(), cleanName(). คืนค่า: string == null ? null : FORMATTING_BY_NAME.get(cleanName(string)).

Parameters

  • String string

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

ChatFormatting result = ChatFormatting.getByName("value");

net.minecraft.ChatFormatting#getChar()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:74
  • Modifiers: public
  • Return: char

คืออะไร

อ่านค่า Char

ทำงานยังไง

คืนค่า: this.code.

Parameters

  • ไม่มี

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

ChatFormatting instance = ...;
char result = instance.getChar();

net.minecraft.ChatFormatting#getColor()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:90
  • Modifiers: public
  • Return: Integer

คืออะไร

อ่านค่า Color

ทำงานยังไง

คืนค่า: this.color.

Parameters

  • ไม่มี

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

ChatFormatting instance = ...;
Integer result = instance.getColor();

net.minecraft.ChatFormatting#getId()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:78
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

ChatFormatting instance = ...;
int result = instance.getId();

net.minecraft.ChatFormatting#getName()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:95
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Name

ทำงานยังไง

เรียกต่อ: name(), toLowerCase(). คืนค่า: this.name().toLowerCase(Locale.ROOT).

Parameters

  • ไม่มี

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

ChatFormatting instance = ...;
String result = instance.getName();

net.minecraft.ChatFormatting#getNames(boolean,boolean)

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:143
  • Modifiers: public static
  • Return: Collection<String>

คืออะไร

อ่านค่า Names

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: newArrayList(), values(), isColor(), isFormat(), add(), getName(). คืนค่า: list.

Parameters

  • boolean bl
  • boolean bl2

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

Collection<String> result = ChatFormatting.getNames(true, true);

net.minecraft.ChatFormatting#getSerializedName()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:155
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChatFormatting instance = ...;
String result = instance.getSerializedName();

net.minecraft.ChatFormatting#isColor()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:86
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: !this.isFormat && this != RESET.

Parameters

  • ไม่มี

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

ChatFormatting instance = ...;
boolean result = instance.isColor();

net.minecraft.ChatFormatting#isFormat()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:82
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.isFormat.

Parameters

  • ไม่มี

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

ChatFormatting instance = ...;
boolean result = instance.isFormat();

net.minecraft.ChatFormatting#stripFormatting(String)

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:104
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ stripFormatting ตาม implementation ของ ChatFormatting

ทำงานยังไง

เรียกต่อ: matcher(), replaceAll(). คืนค่า: string == null ? null : STRIP_FORMATTING_PATTERN.matcher(string).replaceAll("").

Parameters

  • String string

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

String result = ChatFormatting.stripFormatting("value");

net.minecraft.ChatFormatting#toString()

  • Origin: common
  • Source: net/minecraft/ChatFormatting.java:99
  • Modifiers: public
  • Return: String

คืออะไร

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

ทำงานยังไง

คืนค่า: this.toString.

Parameters

  • ไม่มี

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

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

CrashReport

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

net.minecraft.CrashReport#addCategory(String)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:166
  • Modifiers: public
  • Return: CrashReportCategory

คืออะไร

เพิ่ม Category

ทำงานยังไง

คืนค่า: this.addCategory(string, 1).

Parameters

  • String string

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

CrashReport instance = ...;
CrashReportCategory result = instance.addCategory("value");

net.minecraft.CrashReport#addCategory(String,int)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:170
  • Modifiers: public
  • Return: CrashReportCategory

คืออะไร

เพิ่ม Category

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: trackingStackTrace, uncategorizedStackTrace. เรียกต่อ: fillInStackTrace(), getStackTrace(), error(), handler(), validateStackTrace(), arraycopy(), add(). สร้างออบเจ็กต์: CrashReportCategory. คืนค่า: crashReportCategory.

Parameters

  • String string
  • int i

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

CrashReport instance = ...;
CrashReportCategory result = instance.addCategory("value", 0);

net.minecraft.CrashReport#CrashReport(String,Throwable)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:34
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: title, exception.

Parameters

  • String string
  • Throwable throwable

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

Throwable throwable = ...;
CrashReport instance = new CrashReport("value", throwable);

net.minecraft.CrashReport#forThrowable(Throwable,String)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:202
  • Modifiers: public static
  • Return: CrashReport

คืออะไร

ดำเนินการ forThrowable ตาม implementation ของ CrashReport

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getCause(), getReport(). สร้างออบเจ็กต์: CrashReport. คืนค่า: crashReport.

Parameters

  • Throwable throwable
  • String string

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

Throwable throwable = ...;
CrashReport result = CrashReport.forThrowable(throwable, "value");

net.minecraft.CrashReport#getDetails()

  • Origin: common
  • Source: net/minecraft/CrashReport.java:47
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Details

ทำงานยังไง

เรียกต่อ: toString(). สร้างออบเจ็กต์: StringBuilder. คืนค่า: stringBuilder.toString().

Parameters

  • ไม่มี

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

CrashReport instance = ...;
String result = instance.getDetails();

net.minecraft.CrashReport#getDetails(StringBuilder)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:53
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า Details

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: uncategorizedStackTrace. เรียกต่อ: isEmpty(), subarray(), get(), getStacktrace(), append(), currentThread(), getName(), appendToCrashReportString().

Parameters

  • StringBuilder stringBuilder

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

CrashReport instance = ...;
StringBuilder stringBuilder = ...;
instance.getDetails(stringBuilder);

net.minecraft.CrashReport#getException()

  • Origin: common
  • Source: net/minecraft/CrashReport.java:43
  • Modifiers: public
  • Return: Throwable

คืออะไร

อ่านค่า Exception

ทำงานยังไง

คืนค่า: this.exception.

Parameters

  • ไม่มี

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

CrashReport instance = ...;
Throwable result = instance.getException();

net.minecraft.CrashReport#getExceptionMessage()

  • Origin: common
  • Source: net/minecraft/CrashReport.java:79
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Exception Message

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getMessage(), setStackTrace(), getStackTrace(), printStackTrace(), toString(), closeQuietly(). สร้างออบเจ็กต์: NullPointerException, StackOverflowError, OutOfMemoryError, StringWriter. คืนค่า: stringWriter.toString().

Parameters

  • ไม่มี

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

CrashReport instance = ...;
String result = instance.getExceptionMessage();

net.minecraft.CrashReport#getFriendlyReport(ReportType)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:127
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Friendly Report

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: this.getFriendlyReport(reportType, List.of()).

Parameters

  • ReportType reportType

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

CrashReport instance = ...;
ReportType reportType = ...;
String result = instance.getFriendlyReport(reportType);

net.minecraft.CrashReport#getFriendlyReport(ReportType,List<String>)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:106
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Friendly Report

ทำงานยังไง

มีการวนลูป. เรียกต่อ: appendHeader(), append(), format(), now(), getExceptionMessage(), getDetails(), toString(). สร้างออบเจ็กต์: StringBuilder. คืนค่า: stringBuilder.toString().

Parameters

  • ReportType reportType
  • List<String> list

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

CrashReport instance = ...;
ReportType reportType = ...;
List<String> list = ...;
String result = instance.getFriendlyReport(reportType, list);

net.minecraft.CrashReport#getSaveFile()

  • Origin: common
  • Source: net/minecraft/CrashReport.java:131
  • Modifiers: public
  • Return: Path

คืออะไร

อ่านค่า Save File

ทำงานยังไง

คืนค่า: this.saveFile.

Parameters

  • ไม่มี

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

CrashReport instance = ...;
Path result = instance.getSaveFile();

net.minecraft.CrashReport#getSystemReport()

  • Origin: common
  • Source: net/minecraft/CrashReport.java:162
  • Modifiers: public
  • Return: SystemReport

คืออะไร

อ่านค่า System Report

ทำงานยังไง

คืนค่า: this.systemReport.

Parameters

  • ไม่มี

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

CrashReport instance = ...;
SystemReport result = instance.getSystemReport();

net.minecraft.CrashReport#getTitle()

  • Origin: common
  • Source: net/minecraft/CrashReport.java:39
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Title

ทำงานยังไง

คืนค่า: this.title.

Parameters

  • ไม่มี

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

CrashReport instance = ...;
String result = instance.getTitle();

net.minecraft.CrashReport#preload()

  • Origin: common
  • Source: net/minecraft/CrashReport.java:217
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ preload ตาม implementation ของ CrashReport

ทำงานยังไง

เรียกต่อ: allocate(), getFriendlyReport(). สร้างออบเจ็กต์: CrashReport, Throwable.

Parameters

  • ไม่มี

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

CrashReport.preload();

net.minecraft.CrashReport#saveToFile(Path,ReportType)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:158
  • Modifiers: public
  • Return: boolean

คืออะไร

บันทึก To File

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: this.saveToFile(path, reportType, List.of()).

Parameters

  • Path path
  • ReportType reportType

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

CrashReport instance = ...;
Path path = ...;
ReportType reportType = ...;
boolean result = instance.saveToFile(path, reportType);

net.minecraft.CrashReport#saveToFile(Path,ReportType,List<String>)

  • Origin: common
  • Source: net/minecraft/CrashReport.java:136
  • Modifiers: public
  • Return: boolean

คืออะไร

บันทึก To File

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. แก้ state: saveFile. เรียกต่อ: getParent(), createDirectoriesSafe(), newBufferedWriter(), write(), getFriendlyReport(), error(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Path path
  • ReportType reportType
  • List<String> list

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

CrashReport instance = ...;
Path path = ...;
ReportType reportType = ...;
List<String> list = ...;
boolean result = instance.saveToFile(path, reportType, list);

CrashReportCategory

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

net.minecraft.CrashReportCategory#CrashReportCategory(String)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: title.

Parameters

  • String string

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

CrashReportCategory instance = new CrashReportCategory("value");

net.minecraft.CrashReportCategory#fillInStackTrace(int)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:104
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ fillInStackTrace ตาม implementation ของ CrashReportCategory

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: stackTrace. เรียกต่อ: currentThread(), getStackTrace(), arraycopy(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • int i

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

CrashReportCategory instance = ...;
int result = instance.fillInStackTrace(0);

net.minecraft.CrashReportCategory#formatLocation(LevelHeightAccessor,BlockPos)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:25
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ formatLocation ตาม implementation ของ CrashReportCategory

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: formatLocation(levelHeightAccessor, blockPos.getX(), blockPos.getY(), blockPos.getZ()).

Parameters

  • LevelHeightAccessor levelHeightAccessor
  • BlockPos blockPos

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

LevelHeightAccessor levelHeightAccessor = ...;
BlockPos blockPos = ...;
String result = CrashReportCategory.formatLocation(levelHeightAccessor, blockPos);

net.minecraft.CrashReportCategory#formatLocation(LevelHeightAccessor,double,double,double)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:21
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ formatLocation ตาม implementation ของ CrashReportCategory

ทำงานยังไง

เรียกต่อ: format(), containing(). คืนค่า: String.format(Locale.ROOT, "%.2f,%.2f,%.2f - %s", d, e, f, formatLocation(levelHeightAccessor, BlockPos.containing(d, e, f))).

Parameters

  • LevelHeightAccessor levelHeightAccessor
  • double d
  • double e
  • double f

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

LevelHeightAccessor levelHeightAccessor = ...;
String result = CrashReportCategory.formatLocation(levelHeightAccessor, 0.0D, 0.0D, 0.0D);

net.minecraft.CrashReportCategory#formatLocation(LevelHeightAccessor,int,int,int)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:29
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ formatLocation ตาม implementation ของ CrashReportCategory

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: append(), format(), blockToSectionCoord(), sectionToBlockCoord(), getMinY(), getMaxY(), toString(). สร้างออบเจ็กต์: StringBuilder. คืนค่า: stringBuilder.toString().

Parameters

  • LevelHeightAccessor levelHeightAccessor
  • int i
  • int j
  • int k

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

LevelHeightAccessor levelHeightAccessor = ...;
String result = CrashReportCategory.formatLocation(levelHeightAccessor, 0, 0, 0);

net.minecraft.CrashReportCategory#getDetails(StringBuilder)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:146
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า Details

ทำงานยังไง

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

Parameters

  • StringBuilder stringBuilder

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

CrashReportCategory instance = ...;
StringBuilder stringBuilder = ...;
instance.getDetails(stringBuilder);

net.minecraft.CrashReportCategory#getStacktrace()

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:167
  • Modifiers: public
  • Return: StackTraceElement[]

คืออะไร

อ่านค่า Stacktrace

ทำงานยังไง

คืนค่า: this.stackTrace.

Parameters

  • ไม่มี

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

CrashReportCategory instance = ...;
StackTraceElement[] result = instance.getStacktrace();

net.minecraft.CrashReportCategory#populateBlockDetails(CrashReportCategory,LevelHeightAccessor,BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:171
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ populateBlockDetails ตาม implementation ของ CrashReportCategory

ทำงานยังไง

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

Parameters

  • CrashReportCategory crashReportCategory
  • LevelHeightAccessor levelHeightAccessor
  • BlockPos blockPos
  • BlockState blockState

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

CrashReportCategory crashReportCategory = ...;
LevelHeightAccessor levelHeightAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
CrashReportCategory.populateBlockDetails(crashReportCategory, levelHeightAccessor, blockPos, blockState);

net.minecraft.CrashReportCategory#setDetail(String,CrashReportDetail<String>)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:85
  • Modifiers: public
  • Return: CrashReportCategory

คืออะไร

กำหนดค่า Detail

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: call(), setDetailError(). คืนค่า: this.

Parameters

  • String string
  • CrashReportDetail<String> crashReportDetail

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

CrashReportCategory instance = ...;
CrashReportDetail<String> crashReportDetail = ...;
CrashReportCategory result = instance.setDetail("value", crashReportDetail);

net.minecraft.CrashReportCategory#setDetail(String,Object)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:95
  • Modifiers: public
  • Return: CrashReportCategory

คืออะไร

กำหนดค่า Detail

ทำงานยังไง

เรียกต่อ: add(), Entry(). สร้างออบเจ็กต์: CrashReportCategory.Entry. คืนค่า: this.

Parameters

  • String string
  • Object object

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

CrashReportCategory instance = ...;
Object object = ...;
CrashReportCategory result = instance.setDetail("value", object);

net.minecraft.CrashReportCategory#setDetailError(String,Throwable)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:100
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Detail Error

ทำงานยังไง

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

Parameters

  • String string
  • Throwable throwable

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

CrashReportCategory instance = ...;
Throwable throwable = ...;
instance.setDetailError("value", throwable);

net.minecraft.CrashReportCategory#trimStacktrace(int)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:140
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ trimStacktrace ตาม implementation ของ CrashReportCategory

ทำงานยังไง

แก้ state: stackTrace. เรียกต่อ: arraycopy().

Parameters

  • int i

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

CrashReportCategory instance = ...;
instance.trimStacktrace(0);

net.minecraft.CrashReportCategory#validateStackTrace(StackTraceElement,StackTraceElement)

  • Origin: common
  • Source: net/minecraft/CrashReportCategory.java:115
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบความถูกต้อง Stack Trace

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isNativeMethod(), getClassName(), equals(), getFileName(), getMethodName(). มีจุด return อย่างน้อย 5 จุด.

Parameters

  • StackTraceElement stackTraceElement
  • StackTraceElement stackTraceElement2

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

CrashReportCategory instance = ...;
StackTraceElement stackTraceElement = ...;
StackTraceElement stackTraceElement2 = ...;
boolean result = instance.validateStackTrace(stackTraceElement, stackTraceElement2);

DefaultUncaughtExceptionHandler

  • Full name: net.minecraft.DefaultUncaughtExceptionHandler
  • Package: net.minecraft
  • Source: commonnet/minecraft/DefaultUncaughtExceptionHandler.java
  • Type: class
  • Modifiers: public
  • Implements: UncaughtExceptionHandler

net.minecraft.DefaultUncaughtExceptionHandler#DefaultUncaughtExceptionHandler(Logger)

  • Origin: common
  • Source: net/minecraft/DefaultUncaughtExceptionHandler.java:9
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: logger.

Parameters

  • Logger logger

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

Logger logger = ...;
DefaultUncaughtExceptionHandler instance = new DefaultUncaughtExceptionHandler(logger);

net.minecraft.DefaultUncaughtExceptionHandler#uncaughtException(Thread,Throwable)

  • Origin: common
  • Source: net/minecraft/DefaultUncaughtExceptionHandler.java:13
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ uncaughtException ตาม implementation ของ DefaultUncaughtExceptionHandler

ทำงานยังไง

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

Parameters

  • Thread thread
  • Throwable throwable

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

DefaultUncaughtExceptionHandler instance = ...;
Thread thread = ...;
Throwable throwable = ...;
instance.uncaughtException(thread, throwable);

DefaultUncaughtExceptionHandlerWithName

  • Full name: net.minecraft.DefaultUncaughtExceptionHandlerWithName
  • Package: net.minecraft
  • Source: commonnet/minecraft/DefaultUncaughtExceptionHandlerWithName.java
  • Type: class
  • Modifiers: public
  • Implements: UncaughtExceptionHandler

net.minecraft.DefaultUncaughtExceptionHandlerWithName#DefaultUncaughtExceptionHandlerWithName(Logger)

  • Origin: common
  • Source: net/minecraft/DefaultUncaughtExceptionHandlerWithName.java:9
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: logger.

Parameters

  • Logger logger

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

Logger logger = ...;
DefaultUncaughtExceptionHandlerWithName instance = new DefaultUncaughtExceptionHandlerWithName(logger);

net.minecraft.DefaultUncaughtExceptionHandlerWithName#uncaughtException(Thread,Throwable)

  • Origin: common
  • Source: net/minecraft/DefaultUncaughtExceptionHandlerWithName.java:13
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ uncaughtException ตาม implementation ของ DefaultUncaughtExceptionHandlerWithName

ทำงานยังไง

เรียกต่อ: error(), getName().

Parameters

  • Thread thread
  • Throwable throwable

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

DefaultUncaughtExceptionHandlerWithName instance = ...;
Thread thread = ...;
Throwable throwable = ...;
instance.uncaughtException(thread, throwable);

DetectedVersion

  • Full name: net.minecraft.DetectedVersion
  • Package: net.minecraft
  • Source: commonnet/minecraft/DetectedVersion.java
  • Type: class
  • Modifiers: public
  • Implements: WorldVersion

net.minecraft.DetectedVersion#getBuildTime()

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:94
  • Modifiers: public
  • Return: Date

คืออะไร

อ่านค่า Build Time

ทำงานยังไง

คืนค่า: this.buildTime.

Parameters

  • ไม่มี

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

DetectedVersion instance = ...;
Date result = instance.getBuildTime();

net.minecraft.DetectedVersion#getDataVersion()

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:79
  • Modifiers: public
  • Return: DataVersion

คืออะไร

อ่านค่า Data Version

ทำงานยังไง

คืนค่า: this.worldVersion.

Parameters

  • ไม่มี

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

DetectedVersion instance = ...;
DataVersion result = instance.getDataVersion();

net.minecraft.DetectedVersion#getId()

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:69
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Id

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

DetectedVersion instance = ...;
String result = instance.getId();

net.minecraft.DetectedVersion#getName()

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:74
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

DetectedVersion instance = ...;
String result = instance.getName();

net.minecraft.DetectedVersion#getPackVersion(PackType)

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:89
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Pack Version

ทำงานยังไง

คืนค่า: packType == PackType.SERVER_DATA ? this.dataPackVersion : this.resourcePackVersion.

Parameters

  • PackType packType

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

DetectedVersion instance = ...;
PackType packType = ...;
int result = instance.getPackVersion(packType);

net.minecraft.DetectedVersion#getProtocolVersion()

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:84
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Protocol Version

ทำงานยังไง

คืนค่า: this.protocolVersion.

Parameters

  • ไม่มี

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

DetectedVersion instance = ...;
int result = instance.getProtocolVersion();

net.minecraft.DetectedVersion#isStable()

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:99
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.stable.

Parameters

  • ไม่มี

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

DetectedVersion instance = ...;
boolean result = instance.isStable();

net.minecraft.DetectedVersion#tryDetectVersion()

  • Origin: common
  • Source: net/minecraft/DetectedVersion.java:54
  • Modifiers: public static
  • Return: WorldVersion

คืออะไร

ดำเนินการ tryDetectVersion ตาม implementation ของ DetectedVersion

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getResourceAsStream(), warn(), parse(). สร้างออบเจ็กต์: InputStreamReader, DetectedVersion, IllegalStateException. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

WorldVersion result = DetectedVersion.tryDetectVersion();

FileUtil

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

net.minecraft.FileUtil#createDirectoriesSafe(Path)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:181
  • Modifiers: public static
  • Return: void

คืออะไร

สร้าง Directories Safe

ทำงานยังไง

เรียกต่อ: createDirectories(), exists(), toRealPath().

Parameters

  • Path path

Throws

  • IOException

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

Path path = ...;
FileUtil.createDirectoriesSafe(path);

net.minecraft.FileUtil#createPathToResource(Path,String,String)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:89
  • Modifiers: public static
  • Return: Path

คืออะไร

สร้าง Path To Resource

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), endsWith(), resolve(). สร้างออบเจ็กต์: InvalidPathException. คืนค่า: path.resolve(path2).

Parameters

  • Path path
  • String string
  • String string2

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

Path path = ...;
Path result = FileUtil.createPathToResource(path, "value", "value");

net.minecraft.FileUtil#decomposePath(String)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:107
  • Modifiers: public static
  • Return: DataResult<List<String>>

คืออะไร

ดำเนินการ decomposePath ตาม implementation ของ FileUtil

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch ; มีการวนลูป. เรียกต่อ: indexOf(), error(), isValidStrictPathSegment(), success(), of(), substring(), add(), length(). สร้างออบเจ็กต์: ArrayList<>. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • String string

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

DataResult<List<String>> result = FileUtil.decomposePath("value");

net.minecraft.FileUtil#findAvailableName(Path,String,String)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:32
  • Modifiers: public static
  • Return: String

คืออะไร

ค้นหา Available Name

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: sanitizeName(), matcher(), matches(), group(), parseInt(), length(), substring(), resolve(). คืนค่า: path.relativize(path3).toString().

Parameters

  • Path path
  • String string
  • String string2

Throws

  • IOException

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

Path path = ...;
String result = FileUtil.findAvailableName(path, "value", "value");

net.minecraft.FileUtil#getFullResourcePath(String)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:99
  • Modifiers: public static
  • Return: String

คืออะไร

อ่านค่า Full Resource Path

ทำงานยังไง

เรียกต่อ: getFullPath(), replace(). คืนค่า: FilenameUtils.getFullPath(string).replace(File.separator, "/").

Parameters

  • String string

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

String result = FileUtil.getFullResourcePath("value");

net.minecraft.FileUtil#isPathNormalized(Path)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:74
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Path Normalized

ทำงานยังไง

เรียกต่อ: normalize(), equals(). คืนค่า: path2.equals(path).

Parameters

  • Path path

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

Path path = ...;
boolean result = FileUtil.isPathNormalized(path);

net.minecraft.FileUtil#isPathPortable(Path)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:79
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Path Portable

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: matcher(), toString(), matches(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Path path

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

Path path = ...;
boolean result = FileUtil.isPathPortable(path);

net.minecraft.FileUtil#isValidStrictPathSegment(String)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:165
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Valid Strict Path Segment

ทำงานยังไง

เรียกต่อ: matcher(), matches(). คืนค่า: STRICT_PATH_SEGMENT_CHECK.matcher(string).matches().

Parameters

  • String string

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

boolean result = FileUtil.isValidStrictPathSegment("value");

net.minecraft.FileUtil#normalizeResourcePath(String)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:103
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ normalizeResourcePath ตาม implementation ของ FileUtil

ทำงานยังไง

เรียกต่อ: normalize(), replace(). คืนค่า: FilenameUtils.normalize(string).replace(File.separator, "/").

Parameters

  • String string

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

String result = FileUtil.normalizeResourcePath("value");

net.minecraft.FileUtil#resolvePath(Path,List<String>)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:147
  • Modifiers: public static
  • Return: Path

คืออะไร

ดำเนินการ resolvePath ตาม implementation ของ FileUtil

ทำงานยังไง

แยกกรณีด้วย switch ; มีการวนลูป. เรียกต่อ: size(), resolve(), get(), getFileSystem(), getPath(). คืนค่า: switch (i) { case 0 -> path.

Parameters

  • Path path
  • List<String> list

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

Path path = ...;
List<String> list = ...;
Path result = FileUtil.resolvePath(path, list);

net.minecraft.FileUtil#sanitizeName(String)

  • Origin: common
  • Source: net/minecraft/FileUtil.java:24
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ sanitizeName ตาม implementation ของ FileUtil

ทำงานยังไง

มีการวนลูป. เรียกต่อ: replace(), replaceAll(). คืนค่า: string.replaceAll("[./\"]", "_").

Parameters

  • String string

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

String result = FileUtil.sanitizeName("value");

net.minecraft.FileUtil#validatePath(String[])

  • Origin: common
  • Source: net/minecraft/FileUtil.java:169
  • Modifiers: public static
  • Return: void

คืออะไร

ตรวจสอบความถูกต้อง Path

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: equals(), isValidStrictPathSegment(), toString(). สร้างออบเจ็กต์: IllegalArgumentException.

Parameters

  • String[] strings

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

String[] strings = ...;
FileUtil.validatePath(strings);

Optionull

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

net.minecraft.Optionull#first(Collection<T>)

  • Origin: common
  • Source: net/minecraft/Optionull.java:29
  • Modifiers: public static
  • Return: T

คืออะไร

ดำเนินการ first ตาม implementation ของ Optionull

ทำงานยังไง

เรียกต่อ: iterator(), hasNext(), next(). คืนค่า: iterator.hasNext() ? iterator.next() : null.

Parameters

  • Collection<T> collection

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

Collection<T> collection = ...;
T result = Optionull.first(collection);

net.minecraft.Optionull#firstOrDefault(Collection<T>,T)

  • Origin: common
  • Source: net/minecraft/Optionull.java:35
  • Modifiers: public static
  • Return: T

คืออะไร

ดำเนินการ firstOrDefault ตาม implementation ของ Optionull

ทำงานยังไง

เรียกต่อ: iterator(), hasNext(), next(). คืนค่า: iterator.hasNext() ? iterator.next() : object.

Parameters

  • Collection<T> collection
  • T object

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

Collection<T> collection = ...;
T object = ...;
T result = Optionull.firstOrDefault(collection, object);

net.minecraft.Optionull#firstOrElse(Collection<T>,Supplier<T>)

  • Origin: common
  • Source: net/minecraft/Optionull.java:40
  • Modifiers: public static
  • Return: T

คืออะไร

ดำเนินการ firstOrElse ตาม implementation ของ Optionull

ทำงานยังไง

เรียกต่อ: iterator(), hasNext(), next(), get(). คืนค่า: iterator.hasNext() ? iterator.next() : supplier.get().

Parameters

  • Collection<T> collection
  • Supplier<T> supplier

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

Collection<T> collection = ...;
Supplier<T> supplier = ...;
T result = Optionull.firstOrElse(collection, supplier);

net.minecraft.Optionull#isNullOrEmpty(boolean[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:49
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: bls == null || bls.length == 0.

Parameters

  • boolean[] bls

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

boolean[] bls = ...;
boolean result = Optionull.isNullOrEmpty(bls);

net.minecraft.Optionull#isNullOrEmpty(byte[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:53
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: bs == null || bs.length == 0.

Parameters

  • byte[] bs

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

byte[] bs = ...;
boolean result = Optionull.isNullOrEmpty(bs);

net.minecraft.Optionull#isNullOrEmpty(char[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:57
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: cs == null || cs.length == 0.

Parameters

  • char[] cs

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

char[] cs = ...;
boolean result = Optionull.isNullOrEmpty(cs);

net.minecraft.Optionull#isNullOrEmpty(double[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:77
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: ds == null || ds.length == 0.

Parameters

  • double[] ds

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

double[] ds = ...;
boolean result = Optionull.isNullOrEmpty(ds);

net.minecraft.Optionull#isNullOrEmpty(float[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:73
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: fs == null || fs.length == 0.

Parameters

  • float[] fs

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

float[] fs = ...;
boolean result = Optionull.isNullOrEmpty(fs);

net.minecraft.Optionull#isNullOrEmpty(int[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:65
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: is == null || is.length == 0.

Parameters

  • int[] is

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

int[] is = ...;
boolean result = Optionull.isNullOrEmpty(is);

net.minecraft.Optionull#isNullOrEmpty(long[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:69
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: ls == null || ls.length == 0.

Parameters

  • long[] ls

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

long[] ls = ...;
boolean result = Optionull.isNullOrEmpty(ls);

net.minecraft.Optionull#isNullOrEmpty(short[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:61
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: ss == null || ss.length == 0.

Parameters

  • short[] ss

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

short[] ss = ...;
boolean result = Optionull.isNullOrEmpty(ss);

net.minecraft.Optionull#isNullOrEmpty(T[])

  • Origin: common
  • Source: net/minecraft/Optionull.java:45
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: objects == null || objects.length == 0.

Parameters

  • T[] objects

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

T[] objects = ...;
boolean result = Optionull.isNullOrEmpty(objects);

net.minecraft.Optionull#map(T,Function<T, R>)

  • Origin: common
  • Source: net/minecraft/Optionull.java:16
  • Modifiers: public static
  • Return: R

คืออะไร

ดำเนินการ map ตาม implementation ของ Optionull

ทำงานยังไง

เรียกต่อ: apply(). คืนค่า: object == null ? null : function.apply(object).

Parameters

  • T object
  • Function<T, R> function

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

T object = ...;
Function<T, R> function = ...;
R result = Optionull.map(object, function);

net.minecraft.Optionull#mapOrDefault(T,Function<T, R>,R)

  • Origin: common
  • Source: net/minecraft/Optionull.java:21
  • Modifiers: public static
  • Return: R

คืออะไร

ดำเนินการ mapOrDefault ตาม implementation ของ Optionull

ทำงานยังไง

เรียกต่อ: apply(). คืนค่า: object == null ? object2 : function.apply(object).

Parameters

  • T object
  • Function<T, R> function
  • R object2

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

T object = ...;
Function<T, R> function = ...;
R object2 = ...;
R result = Optionull.mapOrDefault(object, function, object2);

net.minecraft.Optionull#mapOrElse(T,Function<T, R>,Supplier<R>)

  • Origin: common
  • Source: net/minecraft/Optionull.java:25
  • Modifiers: public static
  • Return: R

คืออะไร

ดำเนินการ mapOrElse ตาม implementation ของ Optionull

ทำงานยังไง

เรียกต่อ: get(), apply(). คืนค่า: object == null ? supplier.get() : function.apply(object).

Parameters

  • T object
  • Function<T, R> function
  • Supplier<R> supplier

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

T object = ...;
Function<T, R> function = ...;
Supplier<R> supplier = ...;
R result = Optionull.mapOrElse(object, function, supplier);

net.minecraft.Optionull#orElse(T,T)

  • Origin: common
  • Source: net/minecraft/Optionull.java:11
  • Modifiers: public static
  • Return: T

คืออะไร

ดำเนินการ orElse ตาม implementation ของ Optionull

ทำงานยังไง

เรียกต่อ: requireNonNullElse(). คืนค่า: Objects.requireNonNullElse(object, object2).

Parameters

  • T object
  • T object2

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

T object = ...;
T object2 = ...;
T result = Optionull.orElse(object, object2);

ReportedException

  • Full name: net.minecraft.ReportedException
  • Package: net.minecraft
  • Source: commonnet/minecraft/ReportedException.java
  • Type: class
  • Modifiers: public
  • Extends: RuntimeException

net.minecraft.ReportedException#getCause()

  • Origin: common
  • Source: net/minecraft/ReportedException.java:14
  • Modifiers: public
  • Return: Throwable

คืออะไร

อ่านค่า Cause

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ReportedException instance = ...;
Throwable result = instance.getCause();

net.minecraft.ReportedException#getMessage()

  • Origin: common
  • Source: net/minecraft/ReportedException.java:19
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Message

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ReportedException instance = ...;
String result = instance.getMessage();

net.minecraft.ReportedException#getReport()

  • Origin: common
  • Source: net/minecraft/ReportedException.java:10
  • Modifiers: public
  • Return: CrashReport

คืออะไร

อ่านค่า Report

ทำงานยังไง

คืนค่า: this.report.

Parameters

  • ไม่มี

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

ReportedException instance = ...;
CrashReport result = instance.getReport();

net.minecraft.ReportedException#ReportedException(CrashReport)

  • Origin: common
  • Source: net/minecraft/ReportedException.java:6
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: report.

Parameters

  • CrashReport crashReport

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

CrashReport crashReport = ...;
ReportedException instance = new ReportedException(crashReport);

ReportType

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

net.minecraft.ReportType#appendHeader(StringBuilder,List<String>)

  • Origin: common
  • Source: net/minecraft/ReportType.java:130
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ appendHeader ตาม implementation ของ ReportType

ทำงานยังไง

มีการวนลูป. เรียกต่อ: append(), header(), getErrorComment().

Parameters

  • StringBuilder stringBuilder
  • List<String> list

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

ReportType instance = ...;
StringBuilder stringBuilder = ...;
List<String> list = ...;
instance.appendHeader(stringBuilder, list);

net.minecraft.ReportType#getErrorComment()

  • Origin: common
  • Source: net/minecraft/ReportType.java:122
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Error Comment

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: get(), getNanos(), size(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

ReportType instance = ...;
String result = instance.getErrorComment();

ResourceLocationException

  • Full name: net.minecraft.ResourceLocationException
  • Package: net.minecraft
  • Source: commonnet/minecraft/ResourceLocationException.java
  • Type: class
  • Modifiers: public
  • Extends: RuntimeException

net.minecraft.ResourceLocationException#ResourceLocationException(String)

  • Origin: common
  • Source: net/minecraft/ResourceLocationException.java:6
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • String string

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

ResourceLocationException instance = new ResourceLocationException("value");

net.minecraft.ResourceLocationException#ResourceLocationException(String,Throwable)

  • Origin: common
  • Source: net/minecraft/ResourceLocationException.java:10
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • String string
  • Throwable throwable

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

Throwable throwable = ...;
ResourceLocationException instance = new ResourceLocationException("value", throwable);

SharedConstants

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

net.minecraft.SharedConstants#debugVoidTerrain(ChunkPos)

  • Origin: common
  • Source: net/minecraft/SharedConstants.java:166
  • Modifiers: public static
  • Return: boolean

คืออะไร

ดำเนินการ debugVoidTerrain ตาม implementation ของ SharedConstants

ทำงานยังไง

เรียกต่อ: getMinBlockX(), getMinBlockZ(). คืนค่า: !debugGenerateSquareTerrainWithoutNoise ? false : i > 8192 || i < 0 || j > 1024 || j < 0.

Parameters

  • ChunkPos chunkPos

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

ChunkPos chunkPos = ...;
boolean result = SharedConstants.debugVoidTerrain(chunkPos);

net.minecraft.SharedConstants#getCurrentVersion()

  • Origin: common
  • Source: net/minecraft/SharedConstants.java:154
  • Modifiers: public static
  • Return: WorldVersion

คืออะไร

อ่านค่า Current Version

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. สร้างออบเจ็กต์: IllegalStateException. คืนค่า: CURRENT_VERSION.

Parameters

  • ไม่มี

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

WorldVersion result = SharedConstants.getCurrentVersion();

net.minecraft.SharedConstants#getProtocolVersion()

  • Origin: common
  • Source: net/minecraft/SharedConstants.java:162
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า Protocol Version

ทำงานยังไง

คืนค่า: 769.

Parameters

  • ไม่มี

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

int result = SharedConstants.getProtocolVersion();

net.minecraft.SharedConstants#setVersion(WorldVersion)

  • Origin: common
  • Source: net/minecraft/SharedConstants.java:140
  • Modifiers: public static
  • Return: void

คืออะไร

กำหนดค่า Version

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. สร้างออบเจ็กต์: IllegalStateException.

Parameters

  • WorldVersion worldVersion

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

WorldVersion worldVersion = ...;
SharedConstants.setVersion(worldVersion);

net.minecraft.SharedConstants#tryDetectVersion()

  • Origin: common
  • Source: net/minecraft/SharedConstants.java:148
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ tryDetectVersion ตาม implementation ของ SharedConstants

ทำงานยังไง

ตรวจเงื่อนไขด้วย if.

Parameters

  • ไม่มี

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

SharedConstants.tryDetectVersion();

SystemReport

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

net.minecraft.SystemReport#appendToCrashReportString(StringBuilder)

  • Origin: common
  • Source: net/minecraft/SystemReport.java:181
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ appendToCrashReportString ตาม implementation ของ SystemReport

ทำงานยังไง

เรียกต่อ: append(), forEach().

Parameters

  • StringBuilder stringBuilder

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

SystemReport instance = ...;
StringBuilder stringBuilder = ...;
instance.appendToCrashReportString(stringBuilder);

net.minecraft.SystemReport#setDetail(String,String)

  • Origin: common
  • Source: net/minecraft/SystemReport.java:65
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Detail

ทำงานยังไง

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

Parameters

  • String string
  • String string2

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

SystemReport instance = ...;
instance.setDetail("value", "value");

net.minecraft.SystemReport#setDetail(String,Supplier<String>)

  • Origin: common
  • Source: net/minecraft/SystemReport.java:69
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Detail

ทำงานยังไง

มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: get(), warn().

Parameters

  • String string
  • Supplier<String> supplier

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

SystemReport instance = ...;
Supplier<String> supplier = ...;
instance.setDetail("value", supplier);

net.minecraft.SystemReport#sizeInMiB(long)

  • Origin: common
  • Source: net/minecraft/SystemReport.java:94
  • Modifiers: public static
  • Return: float

คืออะไร

ดำเนินการ sizeInMiB ตาม implementation ของ SystemReport

ทำงานยังไง

คืนค่า: (float)l / 1048576.0F.

Parameters

  • long l

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

float result = SystemReport.sizeInMiB(0L);

net.minecraft.SystemReport#SystemReport()

  • Origin: common
  • Source: net/minecraft/SystemReport.java:41
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: setDetail(), getCurrentVersion(), getName(), getId(), getRuntime(), maxMemory(), totalMemory(), freeMemory(). สร้างออบเจ็กต์: SystemInfo. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

SystemReport instance = new SystemReport();

net.minecraft.SystemReport#toLineSeparatedString()

  • Origin: common
  • Source: net/minecraft/SystemReport.java:192
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toLineSeparatedString ตาม implementation ของ SystemReport

ทำงานยังไง

เรียกต่อ: entrySet(), stream(), map(), getKey(), getValue(), collect(), joining(), lineSeparator(). คืนค่า: this.entries.entrySet().stream().map(entry -> entry.getKey() + ": " + entry.getValue()).collect(Collectors.joining(System.lineSeparator())).

Parameters

  • ไม่มี

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

SystemReport instance = ...;
String result = instance.toLineSeparatedString();

TracingExecutor

  • Full name: net.minecraft.TracingExecutor
  • Package: net.minecraft
  • Source: commonnet/minecraft/TracingExecutor.java
  • Type: record
  • Modifiers: public
  • Implements: Executor

net.minecraft.TracingExecutor#execute(Runnable)

  • Origin: common
  • Source: net/minecraft/TracingExecutor.java:32
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

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

Parameters

  • Runnable runnable

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

TracingExecutor instance = ...;
Runnable runnable = ...;
instance.execute(runnable);

net.minecraft.TracingExecutor#forName(String)

  • Origin: common
  • Source: net/minecraft/TracingExecutor.java:10
  • Modifiers: public
  • Return: Executor

คืออะไร

ดำเนินการ forName ตาม implementation ของ TracingExecutor

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: execute(), currentThread(), getName(), setName(), beginZone(), run(), isAvailable(). คืนค่า: runnable -> this.service.execute(() -> { Thread thread = Thread.currentThread().

Parameters

  • String string

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

TracingExecutor instance = ...;
Executor result = instance.forName("value");

net.minecraft.TracingExecutor#shutdownAndAwait(long,TimeUnit)

  • Origin: common
  • Source: net/minecraft/TracingExecutor.java:37
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ shutdownAndAwait ตาม implementation ของ TracingExecutor

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: shutdown(), awaitTermination(), shutdownNow().

Parameters

  • long l
  • TimeUnit timeUnit

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

TracingExecutor instance = ...;
TimeUnit timeUnit = ...;
instance.shutdownAndAwait(0L, timeUnit);

Util

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

net.minecraft.Util#allOf()

  • Origin: common
  • Source: net/minecraft/Util.java:301
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: object -> true.

Parameters

  • ไม่มี

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

Predicate<T> result = Util.allOf();

net.minecraft.Util#allOf(List<? extends Predicate<? super T>>)

  • Origin: common
  • Source: net/minecraft/Util.java:346
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: size(), get(), toArray(). คืนค่า: switch (list.size()) { case 0 -> allOf().

Parameters

  • List<? extends Predicate<? super T>> list

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

List<? extends Predicate<? super T>> list = ...;
Predicate<T> result = Util.allOf(list);

net.minecraft.Util#allOf(Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:305
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: (Predicate<T>)predicate.

Parameters

  • Predicate<? super T> predicate

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

Predicate<? super T> predicate = ...;
Predicate<T> result = Util.allOf(predicate);

net.minecraft.Util#allOf(Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:309
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) && predicate2.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<T> result = Util.allOf(predicate, predicate2);

net.minecraft.Util#allOf(Predicate<? super T>,Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:313
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2
  • Predicate<? super T> predicate3

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<? super T> predicate3 = ...;
Predicate<T> result = Util.allOf(predicate, predicate2, predicate3);

net.minecraft.Util#allOf(Predicate<? super T>,Predicate<? super T>,Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:317
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2
  • Predicate<? super T> predicate3
  • Predicate<? super T> predicate4

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<? super T> predicate3 = ...;
Predicate<? super T> predicate4 = ...;
Predicate<T> result = Util.allOf(predicate, predicate2, predicate3, predicate4);

net.minecraft.Util#allOf(Predicate<? super T>,Predicate<? super T>,Predicate<? super T>,Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:323
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object) && predicate5.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2
  • Predicate<? super T> predicate3
  • Predicate<? super T> predicate4
  • Predicate<? super T> predicate5

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<? super T> predicate3 = ...;
Predicate<? super T> predicate4 = ...;
Predicate<? super T> predicate5 = ...;
Predicate<T> result = Util.allOf(predicate, predicate2, predicate3, predicate4, predicate5);

net.minecraft.Util#allOf(Predicate<? super T>[])

  • Origin: common
  • Source: net/minecraft/Util.java:333
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ allOf ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • Predicate<? super T>[] predicates

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

Predicate<? super T>[] predicates = ...;
Predicate<T> result = Util.allOf(predicates);

net.minecraft.Util#anyOf()

  • Origin: common
  • Source: net/minecraft/Util.java:367
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: object -> false.

Parameters

  • ไม่มี

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

Predicate<T> result = Util.anyOf();

net.minecraft.Util#anyOf(List<? extends Predicate<? super T>>)

  • Origin: common
  • Source: net/minecraft/Util.java:412
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: size(), get(), toArray(). คืนค่า: switch (list.size()) { case 0 -> anyOf().

Parameters

  • List<? extends Predicate<? super T>> list

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

List<? extends Predicate<? super T>> list = ...;
Predicate<T> result = Util.anyOf(list);

net.minecraft.Util#anyOf(Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:371
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: (Predicate<T>)predicate.

Parameters

  • Predicate<? super T> predicate

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

Predicate<? super T> predicate = ...;
Predicate<T> result = Util.anyOf(predicate);

net.minecraft.Util#anyOf(Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:375
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) || predicate2.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<T> result = Util.anyOf(predicate, predicate2);

net.minecraft.Util#anyOf(Predicate<? super T>,Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:379
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2
  • Predicate<? super T> predicate3

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<? super T> predicate3 = ...;
Predicate<T> result = Util.anyOf(predicate, predicate2, predicate3);

net.minecraft.Util#anyOf(Predicate<? super T>,Predicate<? super T>,Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:383
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2
  • Predicate<? super T> predicate3
  • Predicate<? super T> predicate4

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<? super T> predicate3 = ...;
Predicate<? super T> predicate4 = ...;
Predicate<T> result = Util.anyOf(predicate, predicate2, predicate3, predicate4);

net.minecraft.Util#anyOf(Predicate<? super T>,Predicate<? super T>,Predicate<? super T>,Predicate<? super T>,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:389
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object) || predicate5.test(object).

Parameters

  • Predicate<? super T> predicate
  • Predicate<? super T> predicate2
  • Predicate<? super T> predicate3
  • Predicate<? super T> predicate4
  • Predicate<? super T> predicate5

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

Predicate<? super T> predicate = ...;
Predicate<? super T> predicate2 = ...;
Predicate<? super T> predicate3 = ...;
Predicate<? super T> predicate4 = ...;
Predicate<? super T> predicate5 = ...;
Predicate<T> result = Util.anyOf(predicate, predicate2, predicate3, predicate4, predicate5);

net.minecraft.Util#anyOf(Predicate<? super T>[])

  • Origin: common
  • Source: net/minecraft/Util.java:399
  • Modifiers: public static
  • Return: Predicate<T>

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • Predicate<? super T>[] predicates

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

Predicate<? super T>[] predicates = ...;
Predicate<T> result = Util.anyOf(predicates);

net.minecraft.Util#backgroundExecutor()

  • Origin: common
  • Source: net/minecraft/Util.java:207
  • Modifiers: public static
  • Return: TracingExecutor

คืออะไร

ดำเนินการ backgroundExecutor ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: BACKGROUND_EXECUTOR.

Parameters

  • ไม่มี

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

TracingExecutor result = Util.backgroundExecutor();

net.minecraft.Util#blockUntilDone(Function<Executor, CompletableFuture<T>>)

  • Origin: common
  • Source: net/minecraft/Util.java:943
  • Modifiers: public static
  • Return: CompletableFuture<T>

คืออะไร

ดำเนินการ blockUntilDone ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: blockUntilDone(function, CompletableFuture::isDone).

Parameters

  • Function<Executor, CompletableFuture<T>> function

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

Function<Executor, CompletableFuture<T>> function = ...;
CompletableFuture<T> result = Util.blockUntilDone(function);

net.minecraft.Util#blockUntilDone(Function<Executor, T>,Predicate<T>)

  • Origin: common
  • Source: net/minecraft/Util.java:947
  • Modifiers: public static
  • Return: T

คืออะไร

ดำเนินการ blockUntilDone ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: apply(), test(), poll(), run(), warn(), size(). สร้างออบเจ็กต์: LinkedBlockingQueue<>. คืนค่า: object.

Parameters

  • Function<Executor, T> function
  • Predicate<T> predicate

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

Function<Executor, T> function = ...;
Predicate<T> predicate = ...;
T result = Util.blockUntilDone(function, predicate);

net.minecraft.Util#copyAndAdd(List<T>,T)

  • Origin: common
  • Source: net/minecraft/Util.java:1027
  • Modifiers: public static
  • Return: List<T>

คืออะไร

คัดลอก And Add

ทำงานยังไง

เรียกต่อ: builderWithExpectedSize(), size(), addAll(), add(), build(). คืนค่า: ImmutableList.<T>builderWithExpectedSize(list.size() + 1).addAll(list).add(object).build().

Parameters

  • List<T> list
  • T object

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

List<T> list = ...;
T object = ...;
List<T> result = Util.copyAndAdd(list, object);

net.minecraft.Util#copyAndAdd(T,List<T>)

  • Origin: common
  • Source: net/minecraft/Util.java:1031
  • Modifiers: public static
  • Return: List<T>

คืออะไร

คัดลอก And Add

ทำงานยังไง

เรียกต่อ: builderWithExpectedSize(), size(), add(), addAll(), build(). คืนค่า: ImmutableList.<T>builderWithExpectedSize(list.size() + 1).add(object).addAll(list).build().

Parameters

  • T object
  • List<T> list

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

T object = ...;
List<T> list = ...;
List<T> result = Util.copyAndAdd(object, list);

net.minecraft.Util#copyAndPut(Map<K, V>,K,V)

  • Origin: common
  • Source: net/minecraft/Util.java:1035
  • Modifiers: public static
  • Return: Map<K, V>

คืออะไร

คัดลอก And Put

ทำงานยังไง

เรียกต่อ: builderWithExpectedSize(), size(), putAll(), put(), buildKeepingLast(). คืนค่า: ImmutableMap.<K, V>builderWithExpectedSize(map.size() + 1).putAll(map).put(object, object2).buildKeepingLast().

Parameters

  • Map<K, V> map
  • K object
  • V object2

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

Map<K, V> map = ...;
K object = ...;
V object2 = ...;
Map<K, V> result = Util.copyAndPut(map, object, object2);

net.minecraft.Util#copyBetweenDirs(Path,Path,Path)

  • Origin: common
  • Source: net/minecraft/Util.java:858
  • Modifiers: public static
  • Return: void

คืออะไร

คัดลอก Between Dirs

ทำงานยังไง

เรียกต่อ: relativize(), resolve(), copy().

Parameters

  • Path path
  • Path path2
  • Path path3

Throws

  • IOException

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

Path path = ...;
Path path2 = ...;
Path path3 = ...;
Util.copyBetweenDirs(path, path2, path3);

net.minecraft.Util#createIndexIdentityLookup(List<T>)

  • Origin: common
  • Source: net/minecraft/Util.java:987
  • Modifiers: public static
  • Return: ToIntFunction<T>

คืออะไร

สร้าง Index Identity Lookup

ทำงานยังไง

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

Parameters

  • List<T> list

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

List<T> list = ...;
ToIntFunction<T> result = Util.createIndexIdentityLookup(list);

net.minecraft.Util#createIndexLookup(List<T>)

  • Origin: common
  • Source: net/minecraft/Util.java:971
  • Modifiers: public static
  • Return: ToIntFunction<T>

คืออะไร

สร้าง Index Lookup

ทำงานยังไง

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

Parameters

  • List<T> list

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

List<T> list = ...;
ToIntFunction<T> result = Util.createIndexLookup(list);

net.minecraft.Util#describeError(Throwable)

  • Origin: common
  • Source: net/minecraft/Util.java:653
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ describeError ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • Throwable throwable

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

Throwable throwable = ...;
String result = Util.describeError(throwable);

net.minecraft.Util#fetchChoiceType(TypeReference,String)

  • Origin: common
  • Source: net/minecraft/Util.java:255
  • Modifiers: public static
  • Return: Type<?>

คืออะไร

ดำเนินการ fetchChoiceType ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: doFetchChoiceType(). คืนค่า: !SharedConstants.CHECK_DATA_FIXER_SCHEMA ? null : doFetchChoiceType(typeReference, string).

Parameters

  • TypeReference typeReference
  • String string

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

TypeReference typeReference = ...;
Type<?> result = Util.fetchChoiceType(typeReference, "value");

net.minecraft.Util#findNextInIterable(Iterable<T>,T)

  • Origin: common
  • Source: net/minecraft/Util.java:495
  • Modifiers: public static
  • Return: T

คืออะไร

ค้นหา Next In Iterable

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: iterator(), next(), hasNext(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Iterable<T> iterable
  • T object

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

Iterable<T> iterable = ...;
T object = ...;
T result = Util.findNextInIterable(iterable, object);

net.minecraft.Util#findPreviousInIterable(Iterable<T>,T)

  • Origin: common
  • Source: net/minecraft/Util.java:515
  • Modifiers: public static
  • Return: T

คืออะไร

ค้นหา Previous In Iterable

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: iterator(), hasNext(), next(), getLast(). คืนค่า: object2.

Parameters

  • Iterable<T> iterable
  • T object

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

Iterable<T> iterable = ...;
T object = ...;
T result = Util.findPreviousInIterable(iterable, object);

net.minecraft.Util#fixedSize(IntStream,int)

  • Origin: common
  • Source: net/minecraft/Util.java:810
  • Modifiers: public static
  • Return: DataResult<int[]>

คืออะไร

ดำเนินการ fixedSize ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: limit(), toArray(), error(), copyOf(), success(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • IntStream intStream
  • int i

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

IntStream intStream = ...;
DataResult<int[]> result = Util.fixedSize(intStream, 0);

net.minecraft.Util#fixedSize(List<T>,int)

  • Origin: common
  • Source: net/minecraft/Util.java:830
  • Modifiers: public static
  • Return: DataResult<List<T>>

คืออะไร

ดำเนินการ fixedSize ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • List<T> list
  • int i

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

List<T> list = ...;
DataResult<List<T>> result = Util.fixedSize(list, 0);

net.minecraft.Util#fixedSize(LongStream,int)

  • Origin: common
  • Source: net/minecraft/Util.java:820
  • Modifiers: public static
  • Return: DataResult<long[]>

คืออะไร

ดำเนินการ fixedSize ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: limit(), toArray(), error(), copyOf(), success(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • LongStream longStream
  • int i

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

LongStream longStream = ...;
DataResult<long[]> result = Util.fixedSize(longStream, 0);

net.minecraft.Util#getEpochMillis()

  • Origin: common
  • Source: net/minecraft/Util.java:142
  • Modifiers: public static
  • Return: long

คืออะไร

อ่านค่า Epoch Millis

ทำงานยังไง

เรียกต่อ: now(), toEpochMilli(). คืนค่า: Instant.now().toEpochMilli().

Parameters

  • ไม่มี

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

long result = Util.getEpochMillis();

net.minecraft.Util#getFilenameFormattedDateTime()

  • Origin: common
  • Source: net/minecraft/Util.java:146
  • Modifiers: public static
  • Return: String

คืออะไร

อ่านค่า Filename Formatted Date Time

ทำงานยังไง

เรียกต่อ: format(), now(). คืนค่า: FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now()).

Parameters

  • ไม่มี

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

String result = Util.getFilenameFormattedDateTime();

net.minecraft.Util#getMillis()

  • Origin: common
  • Source: net/minecraft/Util.java:134
  • Modifiers: public static
  • Return: long

คืออะไร

อ่านค่า Millis

ทำงานยังไง

เรียกต่อ: getNanos(). คืนค่า: getNanos() / 1000000L.

Parameters

  • ไม่มี

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

long result = Util.getMillis();

net.minecraft.Util#getNanos()

  • Origin: common
  • Source: net/minecraft/Util.java:138
  • Modifiers: public static
  • Return: long

คืออะไร

อ่านค่า Nanos

ทำงานยังไง

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

Parameters

  • ไม่มี

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

long result = Util.getNanos();

net.minecraft.Util#getPlatform()

  • Origin: common
  • Source: net/minecraft/Util.java:454
  • Modifiers: public static
  • Return: Util.OS

คืออะไร

อ่านค่า Platform

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getProperty(), toLowerCase(), contains(). มีจุด return อย่างน้อย 6 จุด.

Parameters

  • ไม่มี

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

Util.OS result = Util.getPlatform();

net.minecraft.Util#getPropertyName(Property<T>,Object)

  • Origin: common
  • Source: net/minecraft/Util.java:124
  • Modifiers: public static
  • Return: String

คืออะไร

อ่านค่า Property Name

ทำงานยังไง

เรียกต่อ: getName(). คืนค่า: property.getName((T)object).

Parameters

  • Property<T> property
  • Object object

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

Property<T> property = ...;
Object object = ...;
String result = Util.getPropertyName(property, object);

net.minecraft.Util#getRandom(int[],RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:665
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า Random

ทำงานยังไง

เรียกต่อ: nextInt(). คืนค่า: is[randomSource.nextInt(is.length)].

Parameters

  • int[] is
  • RandomSource randomSource

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

int[] is = ...;
RandomSource randomSource = ...;
int result = Util.getRandom(is, randomSource);

net.minecraft.Util#getRandom(List<T>,RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:669
  • Modifiers: public static
  • Return: T

คืออะไร

อ่านค่า Random

ทำงานยังไง

เรียกต่อ: get(), nextInt(), size(). คืนค่า: list.get(randomSource.nextInt(list.size())).

Parameters

  • List<T> list
  • RandomSource randomSource

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

List<T> list = ...;
RandomSource randomSource = ...;
T result = Util.getRandom(list, randomSource);

net.minecraft.Util#getRandom(T[],RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:661
  • Modifiers: public static
  • Return: T

คืออะไร

อ่านค่า Random

ทำงานยังไง

เรียกต่อ: nextInt(). คืนค่า: objects[randomSource.nextInt(objects.length)].

Parameters

  • T[] objects
  • RandomSource randomSource

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

T[] objects = ...;
RandomSource randomSource = ...;
T result = Util.getRandom(objects, randomSource);

net.minecraft.Util#getRandomSafe(List<T>,RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:673
  • Modifiers: public static
  • Return: Optional<T>

คืออะไร

อ่านค่า Random Safe

ทำงานยังไง

เรียกต่อ: isEmpty(), empty(), of(), getRandom(). คืนค่า: list.isEmpty() ? Optional.empty() : Optional.of(getRandom(list, randomSource)).

Parameters

  • List<T> list
  • RandomSource randomSource

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

List<T> list = ...;
RandomSource randomSource = ...;
Optional<T> result = Util.getRandomSafe(list, randomSource);

net.minecraft.Util#getRegisteredName(Registry<T>,T)

  • Origin: common
  • Source: net/minecraft/Util.java:296
  • Modifiers: public static
  • Return: String

คืออะไร

อ่านค่า Registered Name

ทำงานยังไง

เรียกต่อ: getKey(), toString(). คืนค่า: resourceLocation == null ? "[unregistered]" : resourceLocation.toString().

Parameters

  • Registry<T> registry
  • T object

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

Registry<T> registry = ...;
T object = ...;
String result = Util.getRegisteredName(registry, object);

net.minecraft.Util#getVmArguments()

  • Origin: common
  • Source: net/minecraft/Util.java:486
  • Modifiers: public static
  • Return: Stream<String>

คืออะไร

อ่านค่า Vm Arguments

ทำงานยังไง

เรียกต่อ: getRuntimeMXBean(), getInputArguments(), stream(), filter(), startsWith(). คืนค่า: runtimeMXBean.getInputArguments().stream().filter(string -> string.startsWith("-X")).

Parameters

  • ไม่มี

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

Stream<String> result = Util.getVmArguments();

net.minecraft.Util#ifElse(Optional<T>,Consumer<T>,Runnable)

  • Origin: common
  • Source: net/minecraft/Util.java:599
  • Modifiers: public static
  • Return: Optional<T>

คืออะไร

ดำเนินการ ifElse ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPresent(), accept(), get(), run(). คืนค่า: optional.

Parameters

  • Optional<T> optional
  • Consumer<T> consumer
  • Runnable runnable

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

Optional<T> optional = ...;
Consumer<T> consumer = ...;
Runnable runnable = ...;
Optional<T> result = Util.ifElse(optional, consumer, runnable);

net.minecraft.Util#ioPool()

  • Origin: common
  • Source: net/minecraft/Util.java:211
  • Modifiers: public static
  • Return: TracingExecutor

คืออะไร

ดำเนินการ ioPool ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: IO_POOL.

Parameters

  • ไม่มี

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

TracingExecutor result = Util.ioPool();

net.minecraft.Util#isSymmetrical(int,int,List<T>)

  • Origin: common
  • Source: net/minecraft/Util.java:433
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • List<T> list

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

List<T> list = ...;
boolean result = Util.isSymmetrical(0, 0, list);

net.minecraft.Util#lastOf(List<T>)

  • Origin: common
  • Source: net/minecraft/Util.java:491
  • Modifiers: public static
  • Return: T

คืออะไร

ดำเนินการ lastOf ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: get(), size(). คืนค่า: list.get(list.size() - 1).

Parameters

  • List<T> list

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

List<T> list = ...;
T result = Util.lastOf(list);

net.minecraft.Util#logAndPauseIfInIde(String)

  • Origin: common
  • Source: net/minecraft/Util.java:617
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ logAndPauseIfInIde ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • String string

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

Util.logAndPauseIfInIde("value");

net.minecraft.Util#logAndPauseIfInIde(String,Throwable)

  • Origin: common
  • Source: net/minecraft/Util.java:624
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ logAndPauseIfInIde ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • String string
  • Throwable throwable

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

Throwable throwable = ...;
Util.logAndPauseIfInIde("value", throwable);

net.minecraft.Util#make(Supplier<T>)

  • Origin: common
  • Source: net/minecraft/Util.java:534
  • Modifiers: public static
  • Return: T

คืออะไร

สร้าง make

ทำงานยังไง

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

Parameters

  • Supplier<T> supplier

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

Supplier<T> supplier = ...;
T result = Util.make(supplier);

net.minecraft.Util#make(T,Consumer<? super T>)

  • Origin: common
  • Source: net/minecraft/Util.java:538
  • Modifiers: public static
  • Return: T

คืออะไร

สร้าง make

ทำงานยังไง

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

Parameters

  • T object
  • Consumer<? super T> consumer

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

T object = ...;
Consumer<? super T> consumer = ...;
T result = Util.make(object, consumer);

net.minecraft.Util#makeDescriptionId(String,ResourceLocation)

  • Origin: common
  • Source: net/minecraft/Util.java:128
  • Modifiers: public static
  • Return: String

คืออะไร

สร้าง Description Id

ทำงานยังไง

เรียกต่อ: getNamespace(), getPath(), replace().

Parameters

  • String string
  • ResourceLocation resourceLocation

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

ResourceLocation resourceLocation = ...;
String result = Util.makeDescriptionId("value", resourceLocation);

net.minecraft.Util#makeEnumMap(Class<K>,Function<K, V>)

  • Origin: common
  • Source: net/minecraft/Util.java:543
  • Modifiers: public static
  • Return: EnumMap<K, V>

คืออะไร

สร้าง Enum Map

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getEnumConstants(), put(), apply(). สร้างออบเจ็กต์: EnumMap<>. คืนค่า: enumMap.

Parameters

  • Class<K> class_
  • Function<K, V> function

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

Class<K> class_ = ...;
Function<K, V> function = ...;
EnumMap<K, V> result = Util.makeEnumMap(class_, function);

net.minecraft.Util#maxAllowedExecutorThreads()

  • Origin: common
  • Source: net/minecraft/Util.java:185
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ maxAllowedExecutorThreads ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: clamp(), getRuntime(), availableProcessors(), getMaxThreads(). คืนค่า: Mth.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, getMaxThreads()).

Parameters

  • ไม่มี

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

int result = Util.maxAllowedExecutorThreads();

net.minecraft.Util#memoize(BiFunction<T, U, R>)

  • Origin: common
  • Source: net/minecraft/Util.java:888
  • Modifiers: public static
  • Return: BiFunction<T, U, R>

คืออะไร

ดำเนินการ memoize ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: apply(), computeIfAbsent(), of(), getFirst(), getSecond(), toString(), size(). สร้างออบเจ็กต์: ConcurrentHashMap<>. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • BiFunction<T, U, R> biFunction

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

BiFunction<T, U, R> biFunction = ...;
BiFunction<T, U, R> result = Util.memoize(biFunction);

net.minecraft.Util#memoize(Function<T, R>)

  • Origin: common
  • Source: net/minecraft/Util.java:872
  • Modifiers: public static
  • Return: Function<T, R>

คืออะไร

ดำเนินการ memoize ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: apply(), computeIfAbsent(), toString(), size(). สร้างออบเจ็กต์: ConcurrentHashMap<>. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Function<T, R> function

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

Function<T, R> function = ...;
Function<T, R> result = Util.memoize(function);

net.minecraft.Util#name(Runnable,Supplier<String>)

  • Origin: common
  • Source: net/minecraft/Util.java:613
  • Modifiers: public static
  • Return: Runnable

คืออะไร

ดำเนินการ name ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: runnable.

Parameters

  • Runnable runnable
  • Supplier<String> supplier

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

Runnable runnable = ...;
Supplier<String> supplier = ...;
Runnable result = Util.name(runnable, supplier);

net.minecraft.Util#name(Supplier<T>,Supplier<String>)

  • Origin: common
  • Source: net/minecraft/Util.java:609
  • Modifiers: public static
  • Return: Supplier<T>

คืออะไร

ดำเนินการ name ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: supplier.

Parameters

  • Supplier<T> supplier
  • Supplier<String> supplier2

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

Supplier<T> supplier = ...;
Supplier<String> supplier2 = ...;
Supplier<T> result = Util.name(supplier, supplier2);

net.minecraft.Util#nonCriticalIoPool()

  • Origin: common
  • Source: net/minecraft/Util.java:215
  • Modifiers: public static
  • Return: TracingExecutor

คืออะไร

ดำเนินการ nonCriticalIoPool ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: DOWNLOAD_POOL.

Parameters

  • ไม่มี

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

TracingExecutor result = Util.nonCriticalIoPool();

net.minecraft.Util#offsetByCodepoints(String,int,int)

  • Origin: common
  • Source: net/minecraft/Util.java:786
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ offsetByCodepoints ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: length(), isHighSurrogate(), charAt(), isLowSurrogate(). คืนค่า: i.

Parameters

  • String string
  • int i
  • int j

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

int result = Util.offsetByCodepoints("value", 0, 0);

net.minecraft.Util#parseAndValidateUntrustedUri(String)

  • Origin: common
  • Source: net/minecraft/Util.java:471
  • Modifiers: public static
  • Return: URI

คืออะไร

แปลง/วิเคราะห์ข้อมูล And Validate Untrusted Uri

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getScheme(), toLowerCase(), contains(). สร้างออบเจ็กต์: URI, URISyntaxException. คืนค่า: uRI.

Parameters

  • String string

Throws

  • URISyntaxException

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

URI result = Util.parseAndValidateUntrustedUri("value");

net.minecraft.Util#pauseInIde(T)

  • Origin: common
  • Source: net/minecraft/Util.java:631
  • Modifiers: public static
  • Return: T

คืออะไร

ดำเนินการ pauseInIde ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: error(), doPause(), getMessage(). คืนค่า: throwable.

Parameters

  • T throwable

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

T throwable = ...;
T result = Util.pauseInIde(throwable);

net.minecraft.Util#prefix(String,Consumer<String>)

  • Origin: common
  • Source: net/minecraft/Util.java:806
  • Modifiers: public static
  • Return: Consumer<String>

คืออะไร

ดำเนินการ prefix ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: accept(). คืนค่า: string2 -> consumer.accept(string + string2).

Parameters

  • String string
  • Consumer<String> consumer

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

Consumer<String> consumer = ...;
Consumer<String> result = Util.prefix("value", consumer);

net.minecraft.Util#readTypedOrThrow(Type<T>,Dynamic<?>)

  • Origin: common
  • Source: net/minecraft/Util.java:1009
  • Modifiers: public static
  • Return: Typed<T>

คืออะไร

อ่าน Typed Or Throw

ทำงานยังไง

คืนค่า: readTypedOrThrow(type, dynamic, false).

Parameters

  • Type<T> type
  • Dynamic<?> dynamic

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

Type<T> type = ...;
Dynamic<?> dynamic = ...;
Typed<T> result = Util.readTypedOrThrow(type, dynamic);

net.minecraft.Util#readTypedOrThrow(Type<T>,Dynamic<?>,boolean)

  • Origin: common
  • Source: net/minecraft/Util.java:1013
  • Modifiers: public static
  • Return: Typed<T>

คืออะไร

อ่าน Typed Or Throw

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: readTyped(), map(), getPartialOrThrow(), getOrThrow(), forThrowable(), addCategory(), setDetail(). สร้างออบเจ็กต์: ReportedException. คืนค่า: bl ? dataResult.getPartialOrThrow(IllegalStateException::new) : dataResult.getOrThrow(IllegalStateException::new).

Parameters

  • Type<T> type
  • Dynamic<?> dynamic
  • boolean bl

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

Type<T> type = ...;
Dynamic<?> dynamic = ...;
Typed<T> result = Util.readTypedOrThrow(type, dynamic, true);

net.minecraft.Util#runNamed(Runnable,String)

  • Origin: common
  • Source: net/minecraft/Util.java:278
  • Modifiers: public static
  • Return: void

คืออะไร

สั่งทำงาน Named

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: currentThread(), getName(), setName(), beginZone(), run().

Parameters

  • Runnable runnable
  • String string

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

Runnable runnable = ...;
Util.runNamed(runnable, "value");

net.minecraft.Util#safeReplaceFile(Path,Path,Path)

  • Origin: common
  • Source: net/minecraft/Util.java:769
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ safeReplaceFile ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • Path path
  • Path path2
  • Path path3

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

Path path = ...;
Path path2 = ...;
Path path3 = ...;
Util.safeReplaceFile(path, path2, path3);

net.minecraft.Util#safeReplaceOrMoveFile(Path,Path,Path,boolean)

  • Origin: common
  • Source: net/minecraft/Util.java:773
  • Modifiers: public static
  • Return: boolean

คืออะไร

ดำเนินการ safeReplaceOrMoveFile ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: exists(), runWithRetries(), createDeleter(), createRenamer(), createFileCreatedCheck(), createFileDeletedCheck(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Path path
  • Path path2
  • Path path3
  • boolean bl

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

Path path = ...;
Path path2 = ...;
Path path3 = ...;
boolean result = Util.safeReplaceOrMoveFile(path, path2, path3, true);

net.minecraft.Util#sanitizeName(String,CharPredicate)

  • Origin: common
  • Source: net/minecraft/Util.java:864
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ sanitizeName ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: toLowerCase(), chars(), mapToObj(), test(), toString(), collect(), joining(). คืนค่า: string.toLowerCase(Locale.ROOT).chars().mapToObj(i -> charPredicate.test((char)i) ? Character.toString((char)i) : "_").collect(Collectors.joining()).

Parameters

  • String string
  • CharPredicate charPredicate

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

CharPredicate charPredicate = ...;
String result = Util.sanitizeName("value", charPredicate);

net.minecraft.Util#sequence(List<? extends CompletableFuture<V>>)

  • Origin: common
  • Source: net/minecraft/Util.java:553
  • Modifiers: public static
  • Return: CompletableFuture<List<V>>

คืออะไร

ดำเนินการ sequence ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), completedFuture(), of(), size(), get(), thenApply(), allOf(), toArray(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • List<? extends CompletableFuture<V>> list

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

List<? extends CompletableFuture<V>> list = ...;
CompletableFuture<List<V>> result = Util.sequence(list);

net.minecraft.Util#sequenceFailFast(List<? extends CompletableFuture<? extends V>>)

  • Origin: common
  • Source: net/minecraft/Util.java:566
  • Modifiers: public static
  • Return: CompletableFuture<List<V>>

คืออะไร

ดำเนินการ sequenceFailFast ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: fallibleSequence(), applyToEither(), identity(). สร้างออบเจ็กต์: CompletableFuture<>. คืนค่า: fallibleSequence(list, completableFuture::completeExceptionally).applyToEither(completableFuture, Function.identity()).

Parameters

  • List<? extends CompletableFuture<? extends V>> list

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

List<? extends CompletableFuture<? extends V>> list = ...;
CompletableFuture<List<V>> result = Util.sequenceFailFast(list);

net.minecraft.Util#sequenceFailFastAndCancel(List<? extends CompletableFuture<? extends V>>)

  • Origin: common
  • Source: net/minecraft/Util.java:571
  • Modifiers: public static
  • Return: CompletableFuture<List<V>>

คืออะไร

ดำเนินการ sequenceFailFastAndCancel ตาม implementation ของ Util

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: fallibleSequence(), completeExceptionally(), cancel(), applyToEither(), identity(). สร้างออบเจ็กต์: CompletableFuture<>.

Parameters

  • List<? extends CompletableFuture<? extends V>> list

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

List<? extends CompletableFuture<? extends V>> list = ...;
CompletableFuture<List<V>> result = Util.sequenceFailFastAndCancel(list);

net.minecraft.Util#setPause(Consumer<String>)

  • Origin: common
  • Source: net/minecraft/Util.java:640
  • Modifiers: public static
  • Return: void

คืออะไร

กำหนดค่า Pause

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Consumer<String> consumer

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

Consumer<String> consumer = ...;
Util.setPause(consumer);

net.minecraft.Util#shuffle(List<T>,RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:934
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ shuffle ตาม implementation ของ Util

ทำงานยังไง

มีการวนลูป. เรียกต่อ: size(), nextInt(), set(), get().

Parameters

  • List<T> list
  • RandomSource randomSource

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

List<T> list = ...;
RandomSource randomSource = ...;
Util.shuffle(list, randomSource);

net.minecraft.Util#shuffledCopy(ObjectArrayList<T>,RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:928
  • Modifiers: public static
  • Return: List<T>

คืออะไร

ดำเนินการ shuffledCopy ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: shuffle(). สร้างออบเจ็กต์: ObjectArrayList<>. คืนค่า: objectArrayList2.

Parameters

  • ObjectArrayList<T> objectArrayList
  • RandomSource randomSource

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

ObjectArrayList<T> objectArrayList = ...;
RandomSource randomSource = ...;
List<T> result = Util.shuffledCopy(objectArrayList, randomSource);

net.minecraft.Util#shuffledCopy(T[],RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:922
  • Modifiers: public static
  • Return: List<T>

คืออะไร

ดำเนินการ shuffledCopy ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: shuffle(). สร้างออบเจ็กต์: ObjectArrayList<>. คืนค่า: objectArrayList.

Parameters

  • T[] objects
  • RandomSource randomSource

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

T[] objects = ...;
RandomSource randomSource = ...;
List<T> result = Util.shuffledCopy(objects, randomSource);

net.minecraft.Util#shutdownExecutors()

  • Origin: common
  • Source: net/minecraft/Util.java:219
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ shutdownExecutors ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Util.shutdownExecutors();

net.minecraft.Util#singleKeyCache(Function<K, V>)

  • Origin: common
  • Source: net/minecraft/Util.java:868
  • Modifiers: public static
  • Return: SingleKeyCache<K, V>

คืออะไร

ดำเนินการ singleKeyCache ตาม implementation ของ Util

ทำงานยังไง

สร้างออบเจ็กต์: SingleKeyCache<>. คืนค่า: new SingleKeyCache<>(function).

Parameters

  • Function<K, V> function

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

Function<K, V> function = ...;
SingleKeyCache<K, V> result = Util.singleKeyCache(function);

net.minecraft.Util#startTimerHackThread()

  • Origin: common
  • Source: net/minecraft/Util.java:839
  • Modifiers: public static
  • Return: void

คืออะไร

เริ่ม Timer Hack Thread

ทำงานยังไง

มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: run(), sleep(), warn(), setDaemon(), setUncaughtExceptionHandler(), start(). สร้างออบเจ็กต์: Thread, DefaultUncaughtExceptionHandler.

Parameters

  • ไม่มี

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

Util.startTimerHackThread();

net.minecraft.Util#throwAsRuntime(Throwable)

  • Origin: common
  • Source: net/minecraft/Util.java:237
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ throwAsRuntime ตาม implementation ของ Util

ทำงานยังไง

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

Parameters

  • Throwable throwable

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

Throwable throwable = ...;
Util.throwAsRuntime(throwable);

net.minecraft.Util#toMap()

  • Origin: common
  • Source: net/minecraft/Util.java:116
  • Modifiers: public static
  • Return: Collector<Entry<? extends K, ? extends V>, ?, Map<K, V>>

คืออะไร

ดำเนินการ toMap ตาม implementation ของ Util

ทำงานยังไง

คืนค่า: Collectors.toMap(Entry::getKey, Entry::getValue).

Parameters

  • ไม่มี

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

Collector<Entry<? extends K, ? extends V>, ?, Map<K, V>> result = Util.toMap();

net.minecraft.Util#toMutableList()

  • Origin: common
  • Source: net/minecraft/Util.java:120
  • Modifiers: public static
  • Return: Collector<T, ?, List<T>>

คืออะไร

ดำเนินการ toMutableList ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: toCollection(). คืนค่า: Collectors.toCollection(Lists::newArrayList).

Parameters

  • ไม่มี

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

Collector<T, ?, List<T>> result = Util.toMutableList();

net.minecraft.Util#toShuffledList(IntStream,RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:910
  • Modifiers: public static
  • Return: IntArrayList

คืออะไร

ดำเนินการ toShuffledList ตาม implementation ของ Util

ทำงานยังไง

มีการวนลูป. เรียกต่อ: wrap(), toArray(), size(), nextInt(), set(), getInt(). คืนค่า: intArrayList.

Parameters

  • IntStream intStream
  • RandomSource randomSource

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

IntStream intStream = ...;
RandomSource randomSource = ...;
IntArrayList result = Util.toShuffledList(intStream, randomSource);

net.minecraft.Util#toShuffledList(Stream<T>,RandomSource)

  • Origin: common
  • Source: net/minecraft/Util.java:904
  • Modifiers: public static
  • Return: List<T>

คืออะไร

ดำเนินการ toShuffledList ตาม implementation ของ Util

ทำงานยังไง

เรียกต่อ: collect(), toList(), shuffle(). คืนค่า: objectArrayList.

Parameters

  • Stream<T> stream
  • RandomSource randomSource

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

Stream<T> stream = ...;
RandomSource randomSource = ...;
List<T> result = Util.toShuffledList(stream, randomSource);

net.minecraft.Util#writeAndReadTypedOrThrow(Typed<A>,Type<B>,UnaryOperator<Dynamic<?>>)

  • Origin: common
  • Source: net/minecraft/Util.java:1004
  • Modifiers: public static
  • Return: Typed<B>

คืออะไร

เขียน And Read Typed Or Throw

ทำงานยังไง

เรียกต่อ: write(), getOrThrow(), readTypedOrThrow(), apply(). คืนค่า: readTypedOrThrow(type, unaryOperator.apply(dynamic), true).

Parameters

  • Typed<A> typed
  • Type<B> type
  • UnaryOperator<Dynamic<?>> unaryOperator

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

Typed<A> typed = ...;
Type<B> type = ...;
UnaryOperator<Dynamic<?>> unaryOperator = ...;
Typed<B> result = Util.writeAndReadTypedOrThrow(typed, type, unaryOperator);

Util$OS

  • Full name: net.minecraft.Util$OS
  • Package: net.minecraft
  • Source: commonnet/minecraft/Util.java
  • Type: enum
  • Modifiers: public

net.minecraft.Util$OS#getOpenUriArguments(URI)

  • Origin: common
  • Source: net/minecraft/Util.java:1081
  • Modifiers: protected
  • Return: String[]

คืออะไร

อ่านค่า Open Uri Arguments

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: toString(), equals(), getScheme(), replace(). คืนค่า: new String[]{"xdg-open", string}.

Parameters

  • URI uRI

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

URI uRI = ...;
@Override
protected String[] getOpenUriArguments(URI uRI) {
    return super.getOpenUriArguments(uRI);
}

net.minecraft.Util$OS#openFile(File)

  • Origin: common
  • Source: net/minecraft/Util.java:1073
  • Modifiers: public
  • Return: void

คืออะไร

เปิด File

ทำงานยังไง

เรียกต่อ: openUri(), toURI().

Parameters

  • File file

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

Util.OS instance = ...;
File file = ...;
instance.openFile(file);

net.minecraft.Util$OS#openPath(Path)

  • Origin: common
  • Source: net/minecraft/Util.java:1077
  • Modifiers: public
  • Return: void

คืออะไร

เปิด Path

ทำงานยังไง

เรียกต่อ: openUri(), toUri().

Parameters

  • Path path

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

Util.OS instance = ...;
Path path = ...;
instance.openPath(path);

net.minecraft.Util$OS#openUri(String)

  • Origin: common
  • Source: net/minecraft/Util.java:1090
  • Modifiers: public
  • Return: void

คืออะไร

เปิด Uri

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: error(). สร้างออบเจ็กต์: URI.

Parameters

  • String string

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

Util.OS instance = ...;
instance.openUri("value");

net.minecraft.Util$OS#openUri(URI)

  • Origin: common
  • Source: net/minecraft/Util.java:1062
  • Modifiers: public
  • Return: void

คืออะไร

เปิด Uri

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: doPrivileged(), getRuntime(), exec(), getOpenUriArguments(), getInputStream(), close(), getErrorStream(), getOutputStream().

Parameters

  • URI uRI

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

Util.OS instance = ...;
URI uRI = ...;
instance.openUri(uRI);

net.minecraft.Util$OS#telemetryName()

  • Origin: common
  • Source: net/minecraft/Util.java:1098
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ telemetryName ตาม implementation ของ Util$OS

ทำงานยังไง

คืนค่า: this.telemetryName.

Parameters

  • ไม่มี

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

Util.OS instance = ...;
String result = instance.telemetryName();

WorldVersion

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

net.minecraft.WorldVersion#getBuildTime()

  • Origin: common
  • Source: net/minecraft/WorldVersion.java:18
  • Modifiers: ``
  • Return: Date

คืออะไร

อ่านค่า Build Time

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WorldVersion instance = ...;
Date result = instance.getBuildTime();

net.minecraft.WorldVersion#getDataVersion()

  • Origin: common
  • Source: net/minecraft/WorldVersion.java:8
  • Modifiers: ``
  • Return: DataVersion

คืออะไร

อ่านค่า Data Version

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WorldVersion instance = ...;
DataVersion result = instance.getDataVersion();

net.minecraft.WorldVersion#getId()

  • Origin: common
  • Source: net/minecraft/WorldVersion.java:10
  • Modifiers: ``
  • Return: String

คืออะไร

อ่านค่า Id

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WorldVersion instance = ...;
String result = instance.getId();

net.minecraft.WorldVersion#getName()

  • Origin: common
  • Source: net/minecraft/WorldVersion.java:12
  • Modifiers: ``
  • Return: String

คืออะไร

อ่านค่า Name

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WorldVersion instance = ...;
String result = instance.getName();

net.minecraft.WorldVersion#getPackVersion(PackType)

  • Origin: common
  • Source: net/minecraft/WorldVersion.java:16
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Pack Version

ทำงานยังไง

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

Parameters

  • PackType packType

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

WorldVersion instance = ...;
PackType packType = ...;
int result = instance.getPackVersion(packType);

net.minecraft.WorldVersion#getProtocolVersion()

  • Origin: common
  • Source: net/minecraft/WorldVersion.java:14
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Protocol Version

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WorldVersion instance = ...;
int result = instance.getProtocolVersion();

net.minecraft.WorldVersion#isStable()

  • Origin: common
  • Source: net/minecraft/WorldVersion.java:20
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WorldVersion instance = ...;
boolean result = instance.isStable();