S00PacketDisconnect .java

net.minecraft.network.login.server.S00PacketDisconnect (class, 51 lines): members: func_149603_c, reason, processPacket, readPacketData, writePacketData.

net.minecraft.network.login.serverclass51 linesserver1.2 KB

Implements

API Surface (4)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerLoginClient handler)
IChatComponent func_149603_c()

Fields & Constants (1)

reason

Code Graph: Dependencies (4)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

S00PacketDisconnect.java51 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.login.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.login.INetHandlerLoginClient;
7
import net.minecraft.util.IChatComponent;
8
9
public class S00PacketDisconnect implements Packet<INetHandlerLoginClient>
10
{
11
    private IChatComponent reason;
12
13
    public S00PacketDisconnect()
14
    {
15
    }
16
17
    public S00PacketDisconnect(IChatComponent reasonIn)
18
    {
19
        this.reason = reasonIn;
20
    }
21
22
    /**
23
     * Reads the raw packet data from the data stream.
24
     */
25
    public void readPacketData(PacketBuffer buf) throws IOException
26
    {
27
        this.reason = buf.readChatComponent();
28
    }
29
30
    /**
31
     * Writes the raw packet data to the data stream.
32
     */
33
    public void writePacketData(PacketBuffer buf) throws IOException
34
    {
35
        buf.writeChatComponent(this.reason);
36
    }
37
38
    /**
39
     * Passes this Packet on to the NetHandler for processing.
40
     */
41
    public void processPacket(INetHandlerLoginClient handler)
42
    {
43
        handler.handleDisconnect(this);
44
    }
45
46
    public IChatComponent func_149603_c()
47
    {
48
        return this.reason;
49
    }
50
}
51

Deobfuscated MCP 1.8.9 source of S00PacketDisconnect from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/login/server/S00PacketDisconnect.java), stored verbatim.