S0BPacketAnimation .java

net.minecraft.network.play.server.S0BPacketAnimation (class): members: getAnimationType, getEntityID, type, entityId, processPacket, readPacketData.

net.minecraft.network.play.serverclass60 linesserver1.4 KB

Implements

API Surface (5)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
int getEntityID()
int getAnimationType()

Fields & Constants (2)

entityId
type

Code Graph: Dependencies (4)

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

Full Source

S0BPacketAnimation.java60 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.entity.Entity;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayClient;
8
9
public class S0BPacketAnimation implements Packet<INetHandlerPlayClient>
10
{
11
    private int entityId;
12
    private int type;
13
14
    public S0BPacketAnimation()
15
    {
16
    }
17
18
    public S0BPacketAnimation(Entity ent, int animationType)
19
    {
20
        this.entityId = ent.getEntityId();
21
        this.type = animationType;
22
    }
23
24
    /**
25
     * Reads the raw packet data from the data stream.
26
     */
27
    public void readPacketData(PacketBuffer buf) throws IOException
28
    {
29
        this.entityId = buf.readVarIntFromBuffer();
30
        this.type = buf.readUnsignedByte();
31
    }
32
33
    /**
34
     * Writes the raw packet data to the data stream.
35
     */
36
    public void writePacketData(PacketBuffer buf) throws IOException
37
    {
38
        buf.writeVarIntToBuffer(this.entityId);
39
        buf.writeByte(this.type);
40
    }
41
42
    /**
43
     * Passes this Packet on to the NetHandler for processing.
44
     */
45
    public void processPacket(INetHandlerPlayClient handler)
46
    {
47
        handler.handleAnimation(this);
48
    }
49
50
    public int getEntityID()
51
    {
52
        return this.entityId;
53
    }
54
55
    public int getAnimationType()
56
    {
57
        return this.type;
58
    }
59
}
60

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