mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-04-20 03:18:17 +02:00
Increase max ratio
Older versions of the game, and creative mode, send itemstacks to the server when dealing with itemstacks, annoying, the compression algo used is good at backreferencing, which means that compressed data can balloon pretty well. 64 should more than cover most cases of legit data, we could probably be more harsh here, but this is likely a fine balance between avoiding bombs and not erring out on legit data.
This commit is contained in:
@@ -44,7 +44,7 @@ public class MinecraftCompressDecoder extends MessageToMessageDecoder<ByteBuf> {
|
||||
Boolean.getBoolean("velocity.increased-compression-cap")
|
||||
? HARD_MAXIMUM_UNCOMPRESSED_SIZE : SERVERBOUND_MAXIMUM_UNCOMPRESSED_SIZE;
|
||||
private static final boolean SKIP_COMPRESSION_VALIDATION = Boolean.getBoolean("velocity.skip-uncompressed-packet-size-validation");
|
||||
private static final double MAX_COMPRESSION_RATIO = Double.parseDouble(System.getProperty("velocity.max-compression-ratio", "10"));
|
||||
private static final double MAX_COMPRESSION_RATIO = Double.parseDouble(System.getProperty("velocity.max-compression-ratio", "64"));
|
||||
private final ProtocolUtils.Direction direction;
|
||||
|
||||
private int threshold;
|
||||
|
||||
Reference in New Issue
Block a user