S13PacketDestroyEntities .java

net.minecraft.network.play.server.S13PacketDestroyEntities (class): members: getEntityIDs, entityIDs, processPacket, readPacketData, writePacketData.

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

Implements

API Surface (4)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
int[] getEntityIDs()

Fields & Constants (1)

entityIDs

Code Graph: Dependencies (3)

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

Full Source

S13PacketDestroyEntities.java60 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
8
public class S13PacketDestroyEntities implements Packet<INetHandlerPlayClient>
9
{
10
    private int[] entityIDs;
11
12
    public S13PacketDestroyEntities()
13
    {
14
    }
15
16
    public S13PacketDestroyEntities(int... entityIDsIn)
17
    {
18
        this.entityIDs = entityIDsIn;
19
    }
20
21
    /**
22
     * Reads the raw packet data from the data stream.
23
     */
24
    public void readPacketData(PacketBuffer buf) throws IOException
25
    {
26
        this.entityIDs = new int[buf.readVarIntFromBuffer()];
27
28
        for (int i = 0; i < this.entityIDs.length; ++i)
29
        {
30
            this.entityIDs[i] = buf.readVarIntFromBuffer();
31
        }
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.writeVarIntToBuffer(this.entityIDs.length);
40
41
        for (int i = 0; i < this.entityIDs.length; ++i)
42
        {
43
            buf.writeVarIntToBuffer(this.entityIDs[i]);
44
        }
45
    }
46
47
    /**
48
     * Passes this Packet on to the NetHandler for processing.
49
     */
50
    public void processPacket(INetHandlerPlayClient handler)
51
    {
52
        handler.handleDestroyEntities(this);
53
    }
54
55
    public int[] getEntityIDs()
56
    {
57
        return this.entityIDs;
58
    }
59
}
60

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