S43PacketCamera .java

net.minecraft.network.play.server.S43PacketCamera (class): members: getEntity, entityId, processPacket, readPacketData, writePacketData. imports: Packet.

net.minecraft.network.play.serverclass52 linesserver1.2 KB

Implements

API Surface (4)

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

Fields & Constants (1)

entityId

Code Graph: Dependencies (5)

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

Full Source

S43PacketCamera.java52 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 S43PacketCamera implements Packet<INetHandlerPlayClient>
11
{
12
    public int entityId;
13
14
    public S43PacketCamera()
15
    {
16
    }
17
18
    public S43PacketCamera(Entity entityIn)
19
    {
20
        this.entityId = entityIn.getEntityId();
21
    }
22
23
    /**
24
     * Reads the raw packet data from the data stream.
25
     */
26
    public void readPacketData(PacketBuffer buf) throws IOException
27
    {
28
        this.entityId = buf.readVarIntFromBuffer();
29
    }
30
31
    /**
32
     * Writes the raw packet data to the data stream.
33
     */
34
    public void writePacketData(PacketBuffer buf) throws IOException
35
    {
36
        buf.writeVarIntToBuffer(this.entityId);
37
    }
38
39
    /**
40
     * Passes this Packet on to the NetHandler for processing.
41
     */
42
    public void processPacket(INetHandlerPlayClient handler)
43
    {
44
        handler.handleCamera(this);
45
    }
46
47
    public Entity getEntity(World worldIn)
48
    {
49
        return worldIn.getEntityByID(this.entityId);
50
    }
51
}
52

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