S09PacketHeldItemChange .java

net.minecraft.network.play.server.S09PacketHeldItemChange (class): members: getHeldItemHotbarIndex, heldItemHotbarIndex, processPacket, readPacketData.

net.minecraft.network.play.serverclass50 linesserver1.2 KB

Implements

API Surface (4)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
int getHeldItemHotbarIndex()

Fields & Constants (1)

heldItemHotbarIndex

Code Graph: Dependencies (3)

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

Full Source

S09PacketHeldItemChange.java50 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 S09PacketHeldItemChange implements Packet<INetHandlerPlayClient>
9
{
10
    private int heldItemHotbarIndex;
11
12
    public S09PacketHeldItemChange()
13
    {
14
    }
15
16
    public S09PacketHeldItemChange(int hotbarIndexIn)
17
    {
18
        this.heldItemHotbarIndex = hotbarIndexIn;
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.heldItemHotbarIndex = buf.readByte();
27
    }
28
29
    /**
30
     * Writes the raw packet data to the data stream.
31
     */
32
    public void writePacketData(PacketBuffer buf) throws IOException
33
    {
34
        buf.writeByte(this.heldItemHotbarIndex);
35
    }
36
37
    /**
38
     * Passes this Packet on to the NetHandler for processing.
39
     */
40
    public void processPacket(INetHandlerPlayClient handler)
41
    {
42
        handler.handleHeldItemChange(this);
43
    }
44
45
    public int getHeldItemHotbarIndex()
46
    {
47
        return this.heldItemHotbarIndex;
48
    }
49
}
50

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