S49PacketUpdateEntityNBT .java

net.minecraft.network.play.server.S49PacketUpdateEntityNBT (class, 62 lines): members: tagCompound, getTagCompound, getEntity, entityId, processPacket.

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

Implements

API Surface (5)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
NBTTagCompound getTagCompound()
Entity getEntity(World worldIn)

Fields & Constants (2)

entityId
tagCompound

Code Graph: Dependencies (6)

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

Full Source

S49PacketUpdateEntityNBT.java62 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.nbt.NBTTagCompound;
6
import net.minecraft.network.Packet;
7
import net.minecraft.network.PacketBuffer;
8
import net.minecraft.network.play.INetHandlerPlayClient;
9
import net.minecraft.world.World;
10
11
public class S49PacketUpdateEntityNBT implements Packet<INetHandlerPlayClient>
12
{
13
    private int entityId;
14
    private NBTTagCompound tagCompound;
15
16
    public S49PacketUpdateEntityNBT()
17
    {
18
    }
19
20
    public S49PacketUpdateEntityNBT(int entityIdIn, NBTTagCompound tagCompoundIn)
21
    {
22
        this.entityId = entityIdIn;
23
        this.tagCompound = tagCompoundIn;
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.entityId = buf.readVarIntFromBuffer();
32
        this.tagCompound = buf.readNBTTagCompoundFromBuffer();
33
    }
34
35
    /**
36
     * Writes the raw packet data to the data stream.
37
     */
38
    public void writePacketData(PacketBuffer buf) throws IOException
39
    {
40
        buf.writeVarIntToBuffer(this.entityId);
41
        buf.writeNBTTagCompoundToBuffer(this.tagCompound);
42
    }
43
44
    /**
45
     * Passes this Packet on to the NetHandler for processing.
46
     */
47
    public void processPacket(INetHandlerPlayClient handler)
48
    {
49
        handler.handleEntityNBT(this);
50
    }
51
52
    public NBTTagCompound getTagCompound()
53
    {
54
        return this.tagCompound;
55
    }
56
57
    public Entity getEntity(World worldIn)
58
    {
59
        return worldIn.getEntityByID(this.entityId);
60
    }
61
}
62

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