C0FPacketConfirmTransaction .java

net.minecraft.network.play.client.C0FPacketConfirmTransaction (class, 63 lines): members: accepted, getUid, uid, getWindowId, windowId, processPacket.

net.minecraft.network.play.clientclass63 linesclient1.5 KB

Implements

API Surface (5)

void processPacket(INetHandlerPlayServer handler)
void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
int getWindowId()
short getUid()

Fields & Constants (3)

windowId
uid
accepted

Code Graph: Dependencies (3)

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

Full Source

C0FPacketConfirmTransaction.java63 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.play.client;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayServer;
7
8
public class C0FPacketConfirmTransaction implements Packet<INetHandlerPlayServer>
9
{
10
    private int windowId;
11
    private short uid;
12
    private boolean accepted;
13
14
    public C0FPacketConfirmTransaction()
15
    {
16
    }
17
18
    public C0FPacketConfirmTransaction(int windowId, short uid, boolean accepted)
19
    {
20
        this.windowId = windowId;
21
        this.uid = uid;
22
        this.accepted = accepted;
23
    }
24
25
    /**
26
     * Passes this Packet on to the NetHandler for processing.
27
     */
28
    public void processPacket(INetHandlerPlayServer handler)
29
    {
30
        handler.processConfirmTransaction(this);
31
    }
32
33
    /**
34
     * Reads the raw packet data from the data stream.
35
     */
36
    public void readPacketData(PacketBuffer buf) throws IOException
37
    {
38
        this.windowId = buf.readByte();
39
        this.uid = buf.readShort();
40
        this.accepted = buf.readByte() != 0;
41
    }
42
43
    /**
44
     * Writes the raw packet data to the data stream.
45
     */
46
    public void writePacketData(PacketBuffer buf) throws IOException
47
    {
48
        buf.writeByte(this.windowId);
49
        buf.writeShort(this.uid);
50
        buf.writeByte(this.accepted ? 1 : 0);
51
    }
52
53
    public int getWindowId()
54
    {
55
        return this.windowId;
56
    }
57
58
    public short getUid()
59
    {
60
        return this.uid;
61
    }
62
}
63

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