S35PacketUpdateTileEntity .java

net.minecraft.network.play.server.S35PacketUpdateTileEntity (class, 72 lines): members: getTileEntityType, getNbtCompound, metadata, nbt, blockPos, getPos.

net.minecraft.network.play.serverclass72 linesserver1.7 KB

Implements

API Surface (6)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
BlockPos getPos()
int getTileEntityType()
NBTTagCompound getNbtCompound()

Fields & Constants (3)

blockPos
metadata
nbt

Code Graph: Dependencies (5)

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

Full Source

S35PacketUpdateTileEntity.java72 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.nbt.NBTTagCompound;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayClient;
8
import net.minecraft.util.BlockPos;
9
10
public class S35PacketUpdateTileEntity implements Packet<INetHandlerPlayClient>
11
{
12
    private BlockPos blockPos;
13
14
    /** Used only for vanilla tile entities */
15
    private int metadata;
16
    private NBTTagCompound nbt;
17
18
    public S35PacketUpdateTileEntity()
19
    {
20
    }
21
22
    public S35PacketUpdateTileEntity(BlockPos blockPosIn, int metadataIn, NBTTagCompound nbtIn)
23
    {
24
        this.blockPos = blockPosIn;
25
        this.metadata = metadataIn;
26
        this.nbt = nbtIn;
27
    }
28
29
    /**
30
     * Reads the raw packet data from the data stream.
31
     */
32
    public void readPacketData(PacketBuffer buf) throws IOException
33
    {
34
        this.blockPos = buf.readBlockPos();
35
        this.metadata = buf.readUnsignedByte();
36
        this.nbt = buf.readNBTTagCompoundFromBuffer();
37
    }
38
39
    /**
40
     * Writes the raw packet data to the data stream.
41
     */
42
    public void writePacketData(PacketBuffer buf) throws IOException
43
    {
44
        buf.writeBlockPos(this.blockPos);
45
        buf.writeByte((byte)this.metadata);
46
        buf.writeNBTTagCompoundToBuffer(this.nbt);
47
    }
48
49
    /**
50
     * Passes this Packet on to the NetHandler for processing.
51
     */
52
    public void processPacket(INetHandlerPlayClient handler)
53
    {
54
        handler.handleUpdateTileEntity(this);
55
    }
56
57
    public BlockPos getPos()
58
    {
59
        return this.blockPos;
60
    }
61
62
    public int getTileEntityType()
63
    {
64
        return this.metadata;
65
    }
66
67
    public NBTTagCompound getNbtCompound()
68
    {
69
        return this.nbt;
70
    }
71
}
72

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