C10PacketCreativeInventoryAction .java

net.minecraft.network.play.client.C10PacketCreativeInventoryAction (class): members: stack, getSlotId, getStack, slotId, processPacket, readPacketData.

net.minecraft.network.play.clientclass60 linesclient1.4 KB

Implements

API Surface (5)

void processPacket(INetHandlerPlayServer handler)
void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
int getSlotId()
ItemStack getStack()

Fields & Constants (2)

slotId
stack

Code Graph: Dependencies (4)

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

Full Source

C10PacketCreativeInventoryAction.java60 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.play.client;
2
3
import java.io.IOException;
4
import net.minecraft.item.ItemStack;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayServer;
8
9
public class C10PacketCreativeInventoryAction implements Packet<INetHandlerPlayServer>
10
{
11
    private int slotId;
12
    private ItemStack stack;
13
14
    public C10PacketCreativeInventoryAction()
15
    {
16
    }
17
18
    public C10PacketCreativeInventoryAction(int slotIdIn, ItemStack stackIn)
19
    {
20
        this.slotId = slotIdIn;
21
        this.stack = stackIn != null ? stackIn.copy() : null;
22
    }
23
24
    /**
25
     * Passes this Packet on to the NetHandler for processing.
26
     */
27
    public void processPacket(INetHandlerPlayServer handler)
28
    {
29
        handler.processCreativeInventoryAction(this);
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.slotId = buf.readShort();
38
        this.stack = buf.readItemStackFromBuffer();
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.writeShort(this.slotId);
47
        buf.writeItemStackToBuffer(this.stack);
48
    }
49
50
    public int getSlotId()
51
    {
52
        return this.slotId;
53
    }
54
55
    public ItemStack getStack()
56
    {
57
        return this.stack;
58
    }
59
}
60

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