S1EPacketRemoveEntityEffect .java

net.minecraft.network.play.server.S1EPacketRemoveEntityEffect (class, 60 lines): members: getEffectId, effectId, getEntityId, entityId, processPacket.

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 getEffectId()

Fields & Constants (2)

entityId
effectId

Code Graph: Dependencies (4)

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

Full Source

S1EPacketRemoveEntityEffect.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
import net.minecraft.potion.PotionEffect;
8
9
public class S1EPacketRemoveEntityEffect implements Packet<INetHandlerPlayClient>
10
{
11
    private int entityId;
12
    private int effectId;
13
14
    public S1EPacketRemoveEntityEffect()
15
    {
16
    }
17
18
    public S1EPacketRemoveEntityEffect(int entityIdIn, PotionEffect effect)
19
    {
20
        this.entityId = entityIdIn;
21
        this.effectId = effect.getPotionID();
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.effectId = 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.effectId);
40
    }
41
42
    /**
43
     * Passes this Packet on to the NetHandler for processing.
44
     */
45
    public void processPacket(INetHandlerPlayClient handler)
46
    {
47
        handler.handleRemoveEntityEffect(this);
48
    }
49
50
    public int getEntityId()
51
    {
52
        return this.entityId;
53
    }
54
55
    public int getEffectId()
56
    {
57
        return this.effectId;
58
    }
59
}
60

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