S3DPacketDisplayScoreboard .java

net.minecraft.network.play.server.S3DPacketDisplayScoreboard (class, 68 lines): members: func_149370_d, func_149371_c, scoreName, position, processPacket.

net.minecraft.network.play.serverclass68 linesserver1.5 KB

Implements

API Surface (5)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
int func_149371_c()
String func_149370_d()

Fields & Constants (2)

position
scoreName

Code Graph: Dependencies (4)

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

Full Source

S3DPacketDisplayScoreboard.java68 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
import net.minecraft.scoreboard.ScoreObjective;
8
9
public class S3DPacketDisplayScoreboard implements Packet<INetHandlerPlayClient>
10
{
11
    private int position;
12
    private String scoreName;
13
14
    public S3DPacketDisplayScoreboard()
15
    {
16
    }
17
18
    public S3DPacketDisplayScoreboard(int positionIn, ScoreObjective scoreIn)
19
    {
20
        this.position = positionIn;
21
22
        if (scoreIn == null)
23
        {
24
            this.scoreName = "";
25
        }
26
        else
27
        {
28
            this.scoreName = scoreIn.getName();
29
        }
30
    }
31
32
    /**
33
     * Reads the raw packet data from the data stream.
34
     */
35
    public void readPacketData(PacketBuffer buf) throws IOException
36
    {
37
        this.position = buf.readByte();
38
        this.scoreName = buf.readStringFromBuffer(16);
39
    }
40
41
    /**
42
     * Writes the raw packet data to the data stream.
43
     */
44
    public void writePacketData(PacketBuffer buf) throws IOException
45
    {
46
        buf.writeByte(this.position);
47
        buf.writeString(this.scoreName);
48
    }
49
50
    /**
51
     * Passes this Packet on to the NetHandler for processing.
52
     */
53
    public void processPacket(INetHandlerPlayClient handler)
54
    {
55
        handler.handleDisplayScoreboard(this);
56
    }
57
58
    public int func_149371_c()
59
    {
60
        return this.position;
61
    }
62
63
    public String func_149370_d()
64
    {
65
        return this.scoreName;
66
    }
67
}
68

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