S28PacketEffect .java

net.minecraft.network.play.server.S28PacketEffect (class): members: isSoundServerwide, getSoundData, getSoundType, getSoundPos, serverWide, soundData.

net.minecraft.network.play.serverclass82 linesserver2.0 KB

Implements

API Surface (7)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
boolean isSoundServerwide()
int getSoundType()
int getSoundData()
BlockPos getSoundPos()

Fields & Constants (4)

soundType
soundPos
soundData
serverWide

Code Graph: Dependencies (4)

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

Full Source

S28PacketEffect.java82 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 S28PacketEffect implements Packet<INetHandlerPlayClient>
10
{
11
    private int soundType;
12
    private BlockPos soundPos;
13
14
    /** can be a block/item id or other depending on the soundtype */
15
    private int soundData;
16
17
    /** If true the sound is played across the server */
18
    private boolean serverWide;
19
20
    public S28PacketEffect()
21
    {
22
    }
23
24
    public S28PacketEffect(int soundTypeIn, BlockPos soundPosIn, int soundDataIn, boolean serverWideIn)
25
    {
26
        this.soundType = soundTypeIn;
27
        this.soundPos = soundPosIn;
28
        this.soundData = soundDataIn;
29
        this.serverWide = serverWideIn;
30
    }
31
32
    /**
33
     * Reads the raw packet data from the data stream.
34
     */
35
    public void readPacketData(PacketBuffer buf) throws IOException
36
    {
37
        this.soundType = buf.readInt();
38
        this.soundPos = buf.readBlockPos();
39
        this.soundData = buf.readInt();
40
        this.serverWide = buf.readBoolean();
41
    }
42
43
    /**
44
     * Writes the raw packet data to the data stream.
45
     */
46
    public void writePacketData(PacketBuffer buf) throws IOException
47
    {
48
        buf.writeInt(this.soundType);
49
        buf.writeBlockPos(this.soundPos);
50
        buf.writeInt(this.soundData);
51
        buf.writeBoolean(this.serverWide);
52
    }
53
54
    /**
55
     * Passes this Packet on to the NetHandler for processing.
56
     */
57
    public void processPacket(INetHandlerPlayClient handler)
58
    {
59
        handler.handleEffect(this);
60
    }
61
62
    public boolean isSoundServerwide()
63
    {
64
        return this.serverWide;
65
    }
66
67
    public int getSoundType()
68
    {
69
        return this.soundType;
70
    }
71
72
    public int getSoundData()
73
    {
74
        return this.soundData;
75
    }
76
77
    public BlockPos getSoundPos()
78
    {
79
        return this.soundPos;
80
    }
81
}
82

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