1
0
mirror of https://github.com/ViaVersion/ViaFabric.git synced 2025-04-14 20:06:01 +02:00

update compat for krypton

This commit is contained in:
creeper123123321 2023-07-02 19:25:03 -03:00
parent ebdd4a71c6
commit d1fe3f8f6e
2 changed files with 8 additions and 3 deletions
src/main
java/com/viaversion/fabric/common/handler
resources

View File

@ -75,7 +75,13 @@ public class FabricDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
@Override @Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof PipelineReorderEvent) { boolean kryptonReorder = false;
switch (evt.toString()) {
case "COMPRESSION_THRESHOLD_UPDATED":
case "COMPRESSION_ENABLED":
kryptonReorder = true;
}
if (evt instanceof PipelineReorderEvent || kryptonReorder) {
reorder(ctx); reorder(ctx);
} }
super.userEventTriggered(ctx, evt); super.userEventTriggered(ctx, evt);

View File

@ -17,8 +17,7 @@
"viaversion": ">=4.6.0" "viaversion": ">=4.6.0"
}, },
"breaks": { "breaks": {
"viafabricplus": "*", "viafabricplus": "*"
"krypton": "*"
}, },
"environment": "*", "environment": "*",
"authors": [ "authors": [