S46PacketSetCompressionLevel .java

net.minecraft.network.play.server.S46PacketSetCompressionLevel (class): members: getThreshold, threshold, processPacket, readPacketData, writePacketData.

net.minecraft.network.play.serverclass41 linesserver1006 B

Implements

API Surface (4)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
int getThreshold()

Fields & Constants (1)

threshold

Code Graph: Dependencies (3)

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

Full Source

S46PacketSetCompressionLevel.java41 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
8
public class S46PacketSetCompressionLevel implements Packet<INetHandlerPlayClient>
9
{
10
    private int threshold;
11
12
    /**
13
     * Reads the raw packet data from the data stream.
14
     */
15
    public void readPacketData(PacketBuffer buf) throws IOException
16
    {
17
        this.threshold = buf.readVarIntFromBuffer();
18
    }
19
20
    /**
21
     * Writes the raw packet data to the data stream.
22
     */
23
    public void writePacketData(PacketBuffer buf) throws IOException
24
    {
25
        buf.writeVarIntToBuffer(this.threshold);
26
    }
27
28
    /**
29
     * Passes this Packet on to the NetHandler for processing.
30
     */
31
    public void processPacket(INetHandlerPlayClient handler)
32
    {
33
        handler.handleSetCompressionLevel(this);
34
    }
35
36
    public int getThreshold()
37
    {
38
        return this.threshold;
39
    }
40
}
41

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