S33PacketUpdateSign .java

net.minecraft.network.play.server.S33PacketUpdateSign (class, 73 lines): members: getLines, blockPos, lines, getPos, world, processPacket, readPacketData.

net.minecraft.network.play.serverclass73 linesserver1.8 KB

Implements

API Surface (5)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
BlockPos getPos()
IChatComponent[] getLines()

Fields & Constants (3)

world
blockPos
lines

Code Graph: Dependencies (6)

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

Full Source

S33PacketUpdateSign.java73 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.util.BlockPos;
8
import net.minecraft.util.IChatComponent;
9
import net.minecraft.world.World;
10
11
public class S33PacketUpdateSign implements Packet<INetHandlerPlayClient>
12
{
13
    private World world;
14
    private BlockPos blockPos;
15
    private IChatComponent[] lines;
16
17
    public S33PacketUpdateSign()
18
    {
19
    }
20
21
    public S33PacketUpdateSign(World worldIn, BlockPos blockPosIn, IChatComponent[] linesIn)
22
    {
23
        this.world = worldIn;
24
        this.blockPos = blockPosIn;
25
        this.lines = new IChatComponent[] {linesIn[0], linesIn[1], linesIn[2], linesIn[3]};
26
    }
27
28
    /**
29
     * Reads the raw packet data from the data stream.
30
     */
31
    public void readPacketData(PacketBuffer buf) throws IOException
32
    {
33
        this.blockPos = buf.readBlockPos();
34
        this.lines = new IChatComponent[4];
35
36
        for (int i = 0; i < 4; ++i)
37
        {
38
            this.lines[i] = buf.readChatComponent();
39
        }
40
    }
41
42
    /**
43
     * Writes the raw packet data to the data stream.
44
     */
45
    public void writePacketData(PacketBuffer buf) throws IOException
46
    {
47
        buf.writeBlockPos(this.blockPos);
48
49
        for (int i = 0; i < 4; ++i)
50
        {
51
            buf.writeChatComponent(this.lines[i]);
52
        }
53
    }
54
55
    /**
56
     * Passes this Packet on to the NetHandler for processing.
57
     */
58
    public void processPacket(INetHandlerPlayClient handler)
59
    {
60
        handler.handleUpdateSign(this);
61
    }
62
63
    public BlockPos getPos()
64
    {
65
        return this.blockPos;
66
    }
67
68
    public IChatComponent[] getLines()
69
    {
70
        return this.lines;
71
    }
72
}
73

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