S19PacketEntityStatus .java

net.minecraft.network.play.server.S19PacketEntityStatus (class): members: logicOpcode, getOpCode, getEntity, entityId, processPacket, readPacketData.

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

Implements

API Surface (5)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
Entity getEntity(World worldIn)
byte getOpCode()

Fields & Constants (2)

entityId
logicOpcode

Code Graph: Dependencies (5)

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

Full Source

S19PacketEntityStatus.java61 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
import net.minecraft.world.World;
9
10
public class S19PacketEntityStatus implements Packet<INetHandlerPlayClient>
11
{
12
    private int entityId;
13
    private byte logicOpcode;
14
15
    public S19PacketEntityStatus()
16
    {
17
    }
18
19
    public S19PacketEntityStatus(Entity entityIn, byte opCodeIn)
20
    {
21
        this.entityId = entityIn.getEntityId();
22
        this.logicOpcode = opCodeIn;
23
    }
24
25
    /**
26
     * Reads the raw packet data from the data stream.
27
     */
28
    public void readPacketData(PacketBuffer buf) throws IOException
29
    {
30
        this.entityId = buf.readInt();
31
        this.logicOpcode = buf.readByte();
32
    }
33
34
    /**
35
     * Writes the raw packet data to the data stream.
36
     */
37
    public void writePacketData(PacketBuffer buf) throws IOException
38
    {
39
        buf.writeInt(this.entityId);
40
        buf.writeByte(this.logicOpcode);
41
    }
42
43
    /**
44
     * Passes this Packet on to the NetHandler for processing.
45
     */
46
    public void processPacket(INetHandlerPlayClient handler)
47
    {
48
        handler.handleEntityStatus(this);
49
    }
50
51
    public Entity getEntity(World worldIn)
52
    {
53
        return worldIn.getEntityByID(this.entityId);
54
    }
55
56
    public byte getOpCode()
57
    {
58
        return this.logicOpcode;
59
    }
60
}
61

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