S25PacketBlockBreakAnim .java

net.minecraft.network.play.server.S25PacketBlockBreakAnim (class): members: getBreakerId, breakerId, getProgress, progress, position, getPosition.

net.minecraft.network.play.serverclass69 linesserver1.6 KB

Implements

API Surface (6)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
int getBreakerId()
BlockPos getPosition()
int getProgress()

Fields & Constants (3)

breakerId
position
progress

Code Graph: Dependencies (4)

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

Full Source

S25PacketBlockBreakAnim.java69 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
9
public class S25PacketBlockBreakAnim implements Packet<INetHandlerPlayClient>
10
{
11
    private int breakerId;
12
    private BlockPos position;
13
    private int progress;
14
15
    public S25PacketBlockBreakAnim()
16
    {
17
    }
18
19
    public S25PacketBlockBreakAnim(int breakerId, BlockPos pos, int progress)
20
    {
21
        this.breakerId = breakerId;
22
        this.position = pos;
23
        this.progress = progress;
24
    }
25
26
    /**
27
     * Reads the raw packet data from the data stream.
28
     */
29
    public void readPacketData(PacketBuffer buf) throws IOException
30
    {
31
        this.breakerId = buf.readVarIntFromBuffer();
32
        this.position = buf.readBlockPos();
33
        this.progress = buf.readUnsignedByte();
34
    }
35
36
    /**
37
     * Writes the raw packet data to the data stream.
38
     */
39
    public void writePacketData(PacketBuffer buf) throws IOException
40
    {
41
        buf.writeVarIntToBuffer(this.breakerId);
42
        buf.writeBlockPos(this.position);
43
        buf.writeByte(this.progress);
44
    }
45
46
    /**
47
     * Passes this Packet on to the NetHandler for processing.
48
     */
49
    public void processPacket(INetHandlerPlayClient handler)
50
    {
51
        handler.handleBlockBreakAnim(this);
52
    }
53
54
    public int getBreakerId()
55
    {
56
        return this.breakerId;
57
    }
58
59
    public BlockPos getPosition()
60
    {
61
        return this.position;
62
    }
63
64
    public int getProgress()
65
    {
66
        return this.progress;
67
    }
68
}
69

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