S3APacketTabComplete .java

net.minecraft.network.play.server.S3APacketTabComplete (class, 60 lines): members: func_149630_c, matches, processPacket, readPacketData, writePacketData.

net.minecraft.network.play.serverclass60 linesserver1.4 KB

Implements

API Surface (4)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
String[] func_149630_c()

Fields & Constants (1)

matches

Code Graph: Dependencies (3)

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

Full Source

S3APacketTabComplete.java60 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayClient;
7
8
public class S3APacketTabComplete implements Packet<INetHandlerPlayClient>
9
{
10
    private String[] matches;
11
12
    public S3APacketTabComplete()
13
    {
14
    }
15
16
    public S3APacketTabComplete(String[] matchesIn)
17
    {
18
        this.matches = matchesIn;
19
    }
20
21
    /**
22
     * Reads the raw packet data from the data stream.
23
     */
24
    public void readPacketData(PacketBuffer buf) throws IOException
25
    {
26
        this.matches = new String[buf.readVarIntFromBuffer()];
27
28
        for (int i = 0; i < this.matches.length; ++i)
29
        {
30
            this.matches[i] = buf.readStringFromBuffer(32767);
31
        }
32
    }
33
34
    /**
35
     * Writes the raw packet data to the data stream.
36
     */
37
    public void writePacketData(PacketBuffer buf) throws IOException
38
    {
39
        buf.writeVarIntToBuffer(this.matches.length);
40
41
        for (String s : this.matches)
42
        {
43
            buf.writeString(s);
44
        }
45
    }
46
47
    /**
48
     * Passes this Packet on to the NetHandler for processing.
49
     */
50
    public void processPacket(INetHandlerPlayClient handler)
51
    {
52
        handler.handleTabComplete(this);
53
    }
54
55
    public String[] func_149630_c()
56
    {
57
        return this.matches;
58
    }
59
}
60

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