S05PacketSpawnPosition .java

net.minecraft.network.play.server.S05PacketSpawnPosition (class): members: spawnBlockPos, getSpawnPos, processPacket, readPacketData, writePacketData.

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

Implements

API Surface (4)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
BlockPos getSpawnPos()

Fields & Constants (1)

spawnBlockPos

Code Graph: Dependencies (4)

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

Full Source

S05PacketSpawnPosition.java51 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.util.BlockPos;
8
9
public class S05PacketSpawnPosition implements Packet<INetHandlerPlayClient>
10
{
11
    private BlockPos spawnBlockPos;
12
13
    public S05PacketSpawnPosition()
14
    {
15
    }
16
17
    public S05PacketSpawnPosition(BlockPos spawnBlockPosIn)
18
    {
19
        this.spawnBlockPos = spawnBlockPosIn;
20
    }
21
22
    /**
23
     * Reads the raw packet data from the data stream.
24
     */
25
    public void readPacketData(PacketBuffer buf) throws IOException
26
    {
27
        this.spawnBlockPos = buf.readBlockPos();
28
    }
29
30
    /**
31
     * Writes the raw packet data to the data stream.
32
     */
33
    public void writePacketData(PacketBuffer buf) throws IOException
34
    {
35
        buf.writeBlockPos(this.spawnBlockPos);
36
    }
37
38
    /**
39
     * Passes this Packet on to the NetHandler for processing.
40
     */
41
    public void processPacket(INetHandlerPlayClient handler)
42
    {
43
        handler.handleSpawnPosition(this);
44
    }
45
46
    public BlockPos getSpawnPos()
47
    {
48
        return this.spawnBlockPos;
49
    }
50
}
51

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