Skip to content

Package net.minecraft.client.server

Part 1/1


IntegratedPlayerList

  • Full name: net.minecraft.client.server.IntegratedPlayerList
  • Package: net.minecraft.client.server
  • Source: clientOnlynet/minecraft/client/server/IntegratedPlayerList.java
  • Type: class
  • Modifiers: public
  • Extends: PlayerList

net.minecraft.client.server.IntegratedPlayerList#canPlayerLogin(SocketAddress,GameProfile)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedPlayerList.java:34
  • Modifiers: public
  • Return: Component

คืออะไร

ตรวจสอบว่าสามารถ Player Login

ทำงานยังไง

เรียกต่อ: getServer(), isSingleplayerOwner(), getPlayerByName(), getName(), translatable().

Parameters

  • SocketAddress socketAddress
  • GameProfile gameProfile

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

IntegratedPlayerList instance = ...;
SocketAddress socketAddress = ...;
GameProfile gameProfile = ...;
Component result = instance.canPlayerLogin(socketAddress, gameProfile);

net.minecraft.client.server.IntegratedPlayerList#getServer()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedPlayerList.java:40
  • Modifiers: public
  • Return: IntegratedServer

คืออะไร

อ่านค่า Server

ทำงานยังไง

คืนค่า: (IntegratedServer)super.getServer().

Parameters

  • ไม่มี

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

IntegratedPlayerList instance = ...;
IntegratedServer result = instance.getServer();

net.minecraft.client.server.IntegratedPlayerList#getSingleplayerData()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedPlayerList.java:44
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

อ่านค่า Singleplayer Data

ทำงานยังไง

คืนค่า: this.playerData.

Parameters

  • ไม่มี

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

IntegratedPlayerList instance = ...;
CompoundTag result = instance.getSingleplayerData();

net.minecraft.client.server.IntegratedPlayerList#IntegratedPlayerList(IntegratedServer,LayeredRegistryAccess<RegistryLayer>,PlayerDataStorage)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedPlayerList.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • IntegratedServer integratedServer
  • LayeredRegistryAccess<RegistryLayer> layeredRegistryAccess
  • PlayerDataStorage playerDataStorage

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

IntegratedServer integratedServer = ...;
LayeredRegistryAccess<RegistryLayer> layeredRegistryAccess = ...;
PlayerDataStorage playerDataStorage = ...;
IntegratedPlayerList instance = new IntegratedPlayerList(integratedServer, layeredRegistryAccess, playerDataStorage);

net.minecraft.client.server.IntegratedPlayerList#save(ServerPlayer)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedPlayerList.java:26
  • Modifiers: protected
  • Return: void

คืออะไร

บันทึก save

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: playerData. เรียกต่อ: getServer(), isSingleplayerOwner(), getGameProfile(), saveWithoutId(). สร้างออบเจ็กต์: CompoundTag.

Parameters

  • ServerPlayer serverPlayer

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

ServerPlayer serverPlayer = ...;
@Override
protected void save(ServerPlayer serverPlayer) {
    super.save(serverPlayer);
}

IntegratedServer

  • Full name: net.minecraft.client.server.IntegratedServer
  • Package: net.minecraft.client.server
  • Source: clientOnlynet/minecraft/client/server/IntegratedServer.java
  • Type: class
  • Modifiers: public
  • Extends: MinecraftServer

net.minecraft.client.server.IntegratedServer#fillServerSystemReport(SystemReport)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:161
  • Modifiers: public
  • Return: SystemReport

คืออะไร

ดำเนินการ fillServerSystemReport ตาม implementation ของ IntegratedServer

ทำงานยังไง

เรียกต่อ: setDetail(), Server(), getModdedStatus(), fullDescription(). คืนค่า: systemReport.

Parameters

  • SystemReport systemReport

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

IntegratedServer instance = ...;
SystemReport systemReport = ...;
SystemReport result = instance.fillServerSystemReport(systemReport);

net.minecraft.client.server.IntegratedServer#forceSynchronousWrites()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:256
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ forceSynchronousWrites ตาม implementation ของ IntegratedServer

ทำงานยังไง

คืนค่า: this.minecraft.options.syncWrites.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.forceSynchronousWrites();

net.minecraft.client.server.IntegratedServer#getForcedGameType()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:260
  • Modifiers: public
  • Return: GameType

คืออะไร

อ่านค่า Forced Game Type

ทำงานยังไง

เรียกต่อ: isPublished(), isHardcore(), firstNonNull(), getGameType(). คืนค่า: this.isPublished() && !this.isHardcore() ? MoreObjects.firstNonNull(this.publishedGameType, this.worldData.getGameType()) : null.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
GameType result = instance.getForcedGameType();

net.minecraft.client.server.IntegratedServer#getFunctionCompilationLevel()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:240
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Function Compilation Level

ทำงานยังไง

คืนค่า: 2.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
int result = instance.getFunctionCompilationLevel();

net.minecraft.client.server.IntegratedServer#getModdedStatus()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:168
  • Modifiers: public
  • Return: ModCheck

คืออะไร

อ่านค่า Modded Status

ทำงานยังไง

เรียกต่อ: checkModStatus(), merge(). คืนค่า: Minecraft.checkModStatus().merge(super.getModdedStatus()).

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
ModCheck result = instance.getModdedStatus();

net.minecraft.client.server.IntegratedServer#getOperatorUserPermissionLevel()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:236
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Operator User Permission Level

ทำงานยังไง

คืนค่า: 2.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
int result = instance.getOperatorUserPermissionLevel();

net.minecraft.client.server.IntegratedServer#getPort()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:223
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Port

ทำงานยังไง

คืนค่า: this.publishedPort.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
int result = instance.getPort();

net.minecraft.client.server.IntegratedServer#getRateLimitPacketsPerSecond()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:149
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Rate Limit Packets Per Second

ทำงานยังไง

คืนค่า: 0.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
int result = instance.getRateLimitPacketsPerSecond();

net.minecraft.client.server.IntegratedServer#getScaledTrackingDistance(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:252
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Scaled Tracking Distance

ทำงานยังไง

เรียกต่อ: entityDistanceScaling(), get(). คืนค่า: (int)(this.minecraft.options.entityDistanceScaling().get() * i).

Parameters

  • int i

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

IntegratedServer instance = ...;
int result = instance.getScaledTrackingDistance(0);

net.minecraft.client.server.IntegratedServer#getServerDirectory()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:141
  • Modifiers: public
  • Return: Path

คืออะไร

อ่านค่า Server Directory

ทำงานยังไง

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

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
Path result = instance.getServerDirectory();

net.minecraft.client.server.IntegratedServer#getTickTimeLogger()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:119
  • Modifiers: protected
  • Return: LocalSampleLogger

คืออะไร

อ่านค่า Tick Time Logger

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected LocalSampleLogger getTickTimeLogger() {
    return super.getTickTimeLogger();
}

net.minecraft.client.server.IntegratedServer#halt(boolean)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:204
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ halt ตาม implementation ของ IntegratedServer

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: lanPinger. เรียกต่อ: executeBlocking(), newArrayList(), getPlayerList(), getPlayers(), getUUID(), equals(), remove(), interrupt().

Parameters

  • boolean bl

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

IntegratedServer instance = ...;
instance.halt(true);

net.minecraft.client.server.IntegratedServer#initServer()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:67
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ initServer ตาม implementation ของ IntegratedServer

ทำงานยังไง

เรียกต่อ: info(), getCurrentVersion(), getName(), setUsesAuthentication(), setPvpAllowed(), setFlightAllowed(), initializeKeyPair(), loadLevel(). คืนค่า: true.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.initServer();

net.minecraft.client.server.IntegratedServer#IntegratedServer(Thread,Minecraft,LevelStorageAccess,PackRepository,WorldStem,Services,ChunkProgressListenerFactory)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:51
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: minecraft. เรียกต่อ: getProxy(), getFixerUpper(), setSingleplayerProfile(), getGameProfile(), setDemo(), isDemo(), setPlayerList(), registries(). สร้างออบเจ็กต์: IntegratedPlayerList.

Parameters

  • Thread thread
  • Minecraft minecraft
  • LevelStorageAccess levelStorageAccess
  • PackRepository packRepository
  • WorldStem worldStem
  • Services services
  • ChunkProgressListenerFactory chunkProgressListenerFactory

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

Thread thread = ...;
Minecraft minecraft = ...;
LevelStorageAccess levelStorageAccess = ...;
PackRepository packRepository = ...;
WorldStem worldStem = ...;
Services services = ...;
ChunkProgressListenerFactory chunkProgressListenerFactory = ...;
IntegratedServer instance = new IntegratedServer(thread, minecraft, levelStorageAccess, packRepository, worldStem, services, chunkProgressListenerFactory);

net.minecraft.client.server.IntegratedServer#isCommandBlockEnabled()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:232
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Command Block Enabled

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.isCommandBlockEnabled();

net.minecraft.client.server.IntegratedServer#isDedicatedServer()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:145
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.isDedicatedServer();

net.minecraft.client.server.IntegratedServer#isEpollEnabled()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:153
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Epoll Enabled

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.isEpollEnabled();

net.minecraft.client.server.IntegratedServer#isPaused()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:80
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.paused.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.isPaused();

net.minecraft.client.server.IntegratedServer#isPublished()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:219
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.publishedPort > -1.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.isPublished();

net.minecraft.client.server.IntegratedServer#isSingleplayerOwner(GameProfile)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:248
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Singleplayer Owner

ทำงานยังไง

เรียกต่อ: getSingleplayerProfile(), getName(), equalsIgnoreCase(). คืนค่า: this.getSingleplayerProfile() != null && gameProfile.getName().equalsIgnoreCase(this.getSingleplayerProfile().getName()).

Parameters

  • GameProfile gameProfile

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

IntegratedServer instance = ...;
GameProfile gameProfile = ...;
boolean result = instance.isSingleplayerOwner(gameProfile);

net.minecraft.client.server.IntegratedServer#isTickTimeLoggingEnabled()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:123
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Tick Time Logging Enabled

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.isTickTimeLoggingEnabled();

net.minecraft.client.server.IntegratedServer#onServerCrash(CrashReport)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:157
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • CrashReport crashReport

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

IntegratedServer instance = ...;
CrashReport crashReport = ...;
instance.onServerCrash(crashReport);

net.minecraft.client.server.IntegratedServer#publishServer(GameType,boolean,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:172
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ publishServer ตาม implementation ของ IntegratedServer

ทำงานยังไง

มีการวนลูป ; มีการจัดการ exception. แก้ state: publishedPort, lanPinger, publishedGameType. เรียกต่อ: prepareForMultiplayer(), getConnection(), prepareKeyPair(), startTcpServerListener(), info(), getMotd(), start(), getPlayerList(). สร้างออบเจ็กต์: LanServerPinger. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • GameType gameType
  • boolean bl
  • int i

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

IntegratedServer instance = ...;
GameType gameType = ...;
boolean result = instance.publishServer(gameType, true, 0);

net.minecraft.client.server.IntegratedServer#reportChunkLoadFailure(Throwable,RegionStorageInfo,ChunkPos)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:277
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ reportChunkLoadFailure ตาม implementation ของ IntegratedServer

ทำงานยังไง

เรียกต่อ: warnOnLowDiskSpace(), execute(), onChunkLoadFailure().

Parameters

  • Throwable throwable
  • RegionStorageInfo regionStorageInfo
  • ChunkPos chunkPos

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

IntegratedServer instance = ...;
Throwable throwable = ...;
RegionStorageInfo regionStorageInfo = ...;
ChunkPos chunkPos = ...;
instance.reportChunkLoadFailure(throwable, regionStorageInfo, chunkPos);

net.minecraft.client.server.IntegratedServer#reportChunkSaveFailure(Throwable,RegionStorageInfo,ChunkPos)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:283
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ reportChunkSaveFailure ตาม implementation ของ IntegratedServer

ทำงานยังไง

เรียกต่อ: warnOnLowDiskSpace(), execute(), onChunkSaveFailure().

Parameters

  • Throwable throwable
  • RegionStorageInfo regionStorageInfo
  • ChunkPos chunkPos

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

IntegratedServer instance = ...;
Throwable throwable = ...;
RegionStorageInfo regionStorageInfo = ...;
ChunkPos chunkPos = ...;
instance.reportChunkSaveFailure(throwable, regionStorageInfo, chunkPos);

net.minecraft.client.server.IntegratedServer#saveEverything(boolean,boolean,boolean)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:265
  • Modifiers: public
  • Return: boolean

คืออะไร

บันทึก Everything

ทำงานยังไง

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

Parameters

  • boolean bl
  • boolean bl2
  • boolean bl3

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

IntegratedServer instance = ...;
boolean result = instance.saveEverything(true, true, true);

net.minecraft.client.server.IntegratedServer#setDefaultGameType(GameType)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:227
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Default Game Type

ทำงานยังไง

แก้ state: publishedGameType.

Parameters

  • GameType gameType

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

IntegratedServer instance = ...;
GameType gameType = ...;
instance.setDefaultGameType(gameType);

net.minecraft.client.server.IntegratedServer#setUUID(UUID)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:244
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า UUID

ทำงานยังไง

แก้ state: uuid.

Parameters

  • UUID uUID

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

IntegratedServer instance = ...;
UUID uUID = ...;
instance.setUUID(uUID);

net.minecraft.client.server.IntegratedServer#shouldInformAdmins()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:137
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Inform Admins

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.shouldInformAdmins();

net.minecraft.client.server.IntegratedServer#shouldRconBroadcast()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:133
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Rcon Broadcast

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
boolean result = instance.shouldRconBroadcast();

net.minecraft.client.server.IntegratedServer#stopServer()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:196
  • Modifiers: public
  • Return: void

คืออะไร

หยุด Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lanPinger. เรียกต่อ: interrupt().

Parameters

  • ไม่มี

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

IntegratedServer instance = ...;
instance.stopServer();

net.minecraft.client.server.IntegratedServer#tickServer(BooleanSupplier)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/IntegratedServer.java:84
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: paused, previousSimulationDistance. เรียกต่อ: getInstance(), isPaused(), get(), push(), info(), saveEverything(), pop(), getConnection().

Parameters

  • BooleanSupplier booleanSupplier

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

IntegratedServer instance = ...;
BooleanSupplier booleanSupplier = ...;
instance.tickServer(booleanSupplier);

LanServer

  • Full name: net.minecraft.client.server.LanServer
  • Package: net.minecraft.client.server
  • Source: clientOnlynet/minecraft/client/server/LanServer.java
  • Type: class
  • Modifiers: public

net.minecraft.client.server.LanServer#getAddress()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServer.java:23
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Address

ทำงานยังไง

คืนค่า: this.address.

Parameters

  • ไม่มี

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

LanServer instance = ...;
String result = instance.getAddress();

net.minecraft.client.server.LanServer#getMotd()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServer.java:19
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Motd

ทำงานยังไง

คืนค่า: this.motd.

Parameters

  • ไม่มี

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

LanServer instance = ...;
String result = instance.getMotd();

net.minecraft.client.server.LanServer#LanServer(String,String)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServer.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: motd, address, pingTime. เรียกต่อ: getMillis().

Parameters

  • String string
  • String string2

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

LanServer instance = new LanServer("value", "value");

net.minecraft.client.server.LanServer#updatePingTime()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServer.java:27
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Ping Time

ทำงานยังไง

แก้ state: pingTime. เรียกต่อ: getMillis().

Parameters

  • ไม่มี

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

LanServer instance = ...;
instance.updatePingTime();

LanServerDetection$LanServerDetector

  • Full name: net.minecraft.client.server.LanServerDetection$LanServerDetector
  • Package: net.minecraft.client.server
  • Source: clientOnlynet/minecraft/client/server/LanServerDetection.java
  • Type: class
  • Modifiers: public static
  • Extends: Thread

net.minecraft.client.server.LanServerDetection$LanServerDetector#LanServerDetector(LanServerDetection.LanServerList)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerDetection.java:30
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: serverList, socket, pingGroup. เรียกต่อ: incrementAndGet(), setDaemon(), setUncaughtExceptionHandler(), getByName(), setSoTimeout(), joinGroup(). สร้างออบเจ็กต์: DefaultUncaughtExceptionHandler, MulticastSocket.

Parameters

  • LanServerDetection.LanServerList lanServerList

Throws

  • IOException

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

LanServerDetection.LanServerList lanServerList = ...;
LanServerDetection.LanServerDetector instance = new LanServerDetection.LanServerDetector(lanServerList);

net.minecraft.client.server.LanServerDetection$LanServerDetector#run()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerDetection.java:41
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน run

ทำงานยังไง

มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: isInterrupted(), receive(), error(), getData(), getOffset(), getLength(), debug(), getAddress(). สร้างออบเจ็กต์: DatagramPacket, String.

Parameters

  • ไม่มี

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

LanServerDetection.LanServerDetector instance = ...;
instance.run();

LanServerDetection$LanServerList

  • Full name: net.minecraft.client.server.LanServerDetection$LanServerList
  • Package: net.minecraft.client.server
  • Source: clientOnlynet/minecraft/client/server/LanServerDetection.java
  • Type: class
  • Modifiers: public static

net.minecraft.client.server.LanServerDetection$LanServerList#addServer(String,InetAddress)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerDetection.java:87
  • Modifiers: public synchronized
  • Return: void

คืออะไร

เพิ่ม Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: isDirty. เรียกต่อ: parseMotd(), parseAddress(), getHostAddress(), getAddress(), equals(), updatePingTime(), add(). สร้างออบเจ็กต์: LanServer.

Parameters

  • String string
  • InetAddress inetAddress

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

LanServerDetection.LanServerList instance = ...;
InetAddress inetAddress = ...;
instance.addServer("value", inetAddress);

net.minecraft.client.server.LanServerDetection$LanServerList#takeDirtyServers()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerDetection.java:76
  • Modifiers: public synchronized
  • Return: List<LanServer>

คืออะไร

ดำเนินการ takeDirtyServers ตาม implementation ของ LanServerDetection$LanServerList

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LanServerDetection.LanServerList instance = ...;
List<LanServer> result = instance.takeDirtyServers();

LanServerPinger

  • Full name: net.minecraft.client.server.LanServerPinger
  • Package: net.minecraft.client.server
  • Source: clientOnlynet/minecraft/client/server/LanServerPinger.java
  • Type: class
  • Modifiers: public
  • Extends: Thread

net.minecraft.client.server.LanServerPinger#createPingString(String,String)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerPinger.java:64
  • Modifiers: public static
  • Return: String

คืออะไร

สร้าง Ping String

ทำงานยังไง

คืนค่า: "[MOTD]" + string + "[/MOTD][AD]" + string2 + "[/AD]".

Parameters

  • String string
  • String string2

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

String result = LanServerPinger.createPingString("value", "value");

net.minecraft.client.server.LanServerPinger#interrupt()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerPinger.java:58
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ interrupt ตาม implementation ของ LanServerPinger

ทำงานยังไง

แก้ state: isRunning.

Parameters

  • ไม่มี

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

LanServerPinger instance = ...;
instance.interrupt();

net.minecraft.client.server.LanServerPinger#LanServerPinger(String,String)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerPinger.java:27
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: motd, serverAddress, socket. เรียกต่อ: incrementAndGet(), setDaemon(), setUncaughtExceptionHandler(). สร้างออบเจ็กต์: DefaultUncaughtExceptionHandler, DatagramSocket.

Parameters

  • String string
  • String string2

Throws

  • IOException

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

LanServerPinger instance = new LanServerPinger("value", "value");

net.minecraft.client.server.LanServerPinger#parseAddress(String)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerPinger.java:78
  • Modifiers: public static
  • Return: String

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: indexOf(), length(), substring(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • String string

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

String result = LanServerPinger.parseAddress("value");

net.minecraft.client.server.LanServerPinger#parseMotd(String)

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerPinger.java:68
  • Modifiers: public static
  • Return: String

คืออะไร

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

ทำงานยังไง

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

Parameters

  • String string

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

String result = LanServerPinger.parseMotd("value");

net.minecraft.client.server.LanServerPinger#run()

  • Origin: clientOnly
  • Source: net/minecraft/client/server/LanServerPinger.java:36
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน run

ทำงานยังไง

มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: createPingString(), getBytes(), isInterrupted(), getByName(), send(), warn(), getMessage(), sleep(). สร้างออบเจ็กต์: DatagramPacket.

Parameters

  • ไม่มี

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

LanServerPinger instance = ...;
instance.run();