S1BPacketEntityAttach .java

net.minecraft.network.play.server.S1BPacketEntityAttach (class): members: getVehicleEntityId, vehicleEntityId, getLeash, leash, getEntityId, entityId.

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

Implements

API Surface (6)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
int getLeash()
int getEntityId()
int getVehicleEntityId()

Fields & Constants (3)

leash
entityId
vehicleEntityId

Code Graph: Dependencies (4)

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

Full Source

S1BPacketEntityAttach.java69 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
9
public class S1BPacketEntityAttach implements Packet<INetHandlerPlayClient>
10
{
11
    private int leash;
12
    private int entityId;
13
    private int vehicleEntityId;
14
15
    public S1BPacketEntityAttach()
16
    {
17
    }
18
19
    public S1BPacketEntityAttach(int leashIn, Entity entityIn, Entity vehicle)
20
    {
21
        this.leash = leashIn;
22
        this.entityId = entityIn.getEntityId();
23
        this.vehicleEntityId = vehicle != null ? vehicle.getEntityId() : -1;
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.readInt();
32
        this.vehicleEntityId = buf.readInt();
33
        this.leash = buf.readUnsignedByte();
34
    }
35
36
    /**
37
     * Writes the raw packet data to the data stream.
38
     */
39
    public void writePacketData(PacketBuffer buf) throws IOException
40
    {
41
        buf.writeInt(this.entityId);
42
        buf.writeInt(this.vehicleEntityId);
43
        buf.writeByte(this.leash);
44
    }
45
46
    /**
47
     * Passes this Packet on to the NetHandler for processing.
48
     */
49
    public void processPacket(INetHandlerPlayClient handler)
50
    {
51
        handler.handleEntityAttach(this);
52
    }
53
54
    public int getLeash()
55
    {
56
        return this.leash;
57
    }
58
59
    public int getEntityId()
60
    {
61
        return this.entityId;
62
    }
63
64
    public int getVehicleEntityId()
65
    {
66
        return this.vehicleEntityId;
67
    }
68
}
69

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