Package net.minecraft.server
Class LanServerPinger
java.lang.Object
java.lang.Thread
net.minecraft.server.LanServerPinger
- All Implemented Interfaces:
Runnable
@Environment(CLIENT) public class LanServerPinger extends Thread
Used to send UDP multicasts to notify other clients of a local game on the same network.
These multicasts will always be sent to 224.0.2.60:4445
where other clients can listen for local games.
- Mappings:
Namespace Name official evb
intermediary net/minecraft/class_1133
named net/minecraft/server/LanServerPinger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields Modifier and Type Field Description private String
addressPort
private static Logger
LOGGER
private String
motd
private boolean
running
private DatagramSocket
socket
private static AtomicInteger
THREAD_ID
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors Constructor Description LanServerPinger(String motd, String addressPort)
-
Method Summary
Modifier and Type Method Description static String
createAnnouncement(String motd, String addressPort)
Creates a server announcement.void
interrupt()
static String
parseAnnouncementAddressPort(String announcement)
static String
parseAnnouncementMotd(String announcement)
void
run()
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
THREAD_ID
- Mappings:
Namespace Name Mixin selector official a
Levb;a:Ljava/util/concurrent/atomic/AtomicInteger;
intermediary field_5525
Lnet/minecraft/class_1133;field_5525:Ljava/util/concurrent/atomic/AtomicInteger;
named THREAD_ID
Lnet/minecraft/server/LanServerPinger;THREAD_ID:Ljava/util/concurrent/atomic/AtomicInteger;
-
LOGGER
- Mappings:
Namespace Name Mixin selector official b
Levb;b:Lorg/apache/logging/log4j/Logger;
intermediary field_5529
Lnet/minecraft/class_1133;field_5529:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/server/LanServerPinger;LOGGER:Lorg/apache/logging/log4j/Logger;
-
motd
- Mappings:
Namespace Name Mixin selector official c
Levb;c:Ljava/lang/String;
intermediary field_5526
Lnet/minecraft/class_1133;field_5526:Ljava/lang/String;
named motd
Lnet/minecraft/server/LanServerPinger;motd:Ljava/lang/String;
-
socket
- Mappings:
Namespace Name Mixin selector official d
Levb;d:Ljava/net/DatagramSocket;
intermediary field_5528
Lnet/minecraft/class_1133;field_5528:Ljava/net/DatagramSocket;
named socket
Lnet/minecraft/server/LanServerPinger;socket:Ljava/net/DatagramSocket;
-
running
private boolean running- Mappings:
Namespace Name Mixin selector official e
Levb;e:Z
intermediary field_5527
Lnet/minecraft/class_1133;field_5527:Z
named running
Lnet/minecraft/server/LanServerPinger;running:Z
-
addressPort
- Mappings:
Namespace Name Mixin selector official f
Levb;f:Ljava/lang/String;
intermediary field_5530
Lnet/minecraft/class_1133;field_5530:Ljava/lang/String;
named addressPort
Lnet/minecraft/server/LanServerPinger;addressPort:Ljava/lang/String;
-
-
Constructor Details
-
LanServerPinger
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official <init>
Levb;<init>(Ljava/lang/String;Ljava/lang/String;)V
intermediary <init>
Lnet/minecraft/class_1133;<init>(Ljava/lang/String;Ljava/lang/String;)V
named <init>
Lnet/minecraft/server/LanServerPinger;<init>(Ljava/lang/String;Ljava/lang/String;)V
-
-
Method Details
-
run
public void run() -
interrupt
public void interrupt() -
createAnnouncement
Creates a server announcement.[MOTD]
// Specifies the beginning of the message of the dayA message of the day
// The message of the day[/MOTD]
// Specifies the end of the message of the day.[AD]
// Specifies the beginning of the address and the port of the local server.the address of the local server.
// Such as192.146.2.1:23132
[/AD]
// Specifies the end of the address and port of the local server.An example of a complete announcement:
[MOTD]A Player's Server[/MOTD][AD]192.168.0.33[/AD]
- Parameters:
motd
- the message of the dayaddressPort
- the address of the server including the IP address and port- Mappings:
Namespace Name Mixin selector official a
Levb;a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
intermediary method_4818
Lnet/minecraft/class_1133;method_4818(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
named createAnnouncement
Lnet/minecraft/server/LanServerPinger;createAnnouncement(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-
parseAnnouncementMotd
- Mappings:
Namespace Name Mixin selector official a
Levb;a(Ljava/lang/String;)Ljava/lang/String;
intermediary method_4819
Lnet/minecraft/class_1133;method_4819(Ljava/lang/String;)Ljava/lang/String;
named parseAnnouncementMotd
Lnet/minecraft/server/LanServerPinger;parseAnnouncementMotd(Ljava/lang/String;)Ljava/lang/String;
-
parseAnnouncementAddressPort
- Mappings:
Namespace Name Mixin selector official b
Levb;b(Ljava/lang/String;)Ljava/lang/String;
intermediary method_4820
Lnet/minecraft/class_1133;method_4820(Ljava/lang/String;)Ljava/lang/String;
named parseAnnouncementAddressPort
Lnet/minecraft/server/LanServerPinger;parseAnnouncementAddressPort(Ljava/lang/String;)Ljava/lang/String;
-