From 5c893ba9b888a6c6f70aa0af840274ec381d32e8 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Tue, 14 Mar 2023 21:10:03 +0100 Subject: [PATCH] Bump version --- gradle.properties | 2 +- .../mixin/base/MixinClientConnection_1.java | 12 +++--------- src/main/resources/viafabricplus.mixins.json | 11 ++++------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/gradle.properties b/gradle.properties index 36fa6db2..560d97b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.19.3+build.5 loader_version=0.14.14 # viafabricplus -mod_version=1.8.9 +mod_version=1.8.10 maven_group=de.florianmichael archives_base_name=viafabricplus diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java index 032062f7..e03c8115 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java @@ -79,9 +79,9 @@ public class MixinClientConnection_1 { @Inject(method = "initChannel", at = @At("TAIL")) public void hackNettyPipeline(Channel channel, CallbackInfo ci) { - final boolean isBedrock = ViaLoadingBase.getClassWrapper().getTargetVersion().isEqualTo(BedrockProtocolVersion.bedrockLatest); + final boolean rakNet = ViaLoadingBase.getClassWrapper().getTargetVersion().isEqualTo(BedrockProtocolVersion.bedrockLatest); - if (channel instanceof SocketChannel || isBedrock) { + if (channel instanceof SocketChannel || rakNet) { final UserConnection user = new UserConnectionImpl(channel, true); channel.attr(ViaFabricPlus.LOCAL_VIA_CONNECTION).set(user); channel.attr(ViaFabricPlus.LOCAL_MINECRAFT_CONNECTION).set(field_11663); @@ -91,7 +91,7 @@ public class MixinClientConnection_1 { channel.pipeline().addBefore("encoder", NettyConstants.HANDLER_ENCODER_NAME, new VLBViaEncodeHandler(user)); channel.pipeline().addBefore("decoder", NettyConstants.HANDLER_DECODER_NAME, new VFPVLBViaDecodeHandler(user)); - if (isBedrock) { + if (rakNet) { user.getProtocolInfo().getPipeline().add(BedrockBaseProtocol.INSTANCE); channel.pipeline().replace("splitter", BedrockRakNetConstants.BATCH_LENGTH_HANDLER_NAME, new BatchLengthCodec()); @@ -108,8 +108,6 @@ public class MixinClientConnection_1 { // Pinging in RakNet is something different if (RakNetPingSessions.isPingSession(address.getAddress())) { RakNetPingSessions.pingSessions.remove(address.getAddress()); - Via.getPlatform().getLogger().info("ViaFabricPlus is capturing RakNet/Ping protocol"); - { // Temporary fix for the ping encoder final RakClientChannel rakChannel = (RakClientChannel) channel; @@ -130,10 +128,6 @@ public class MixinClientConnection_1 { channel.pipeline().addBefore("prepender", PreNettyConstants.HANDLER_ENCODER_NAME, new VFPPreNettyEncoder(user)); channel.pipeline().addBefore("splitter", PreNettyConstants.HANDLER_DECODER_NAME, new VFPPreNettyDecoder(user)); } - - for (String name : channel.pipeline().names()) { - System.out.println(name); - } } } } diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json index 54360c26..7d69600d 100644 --- a/src/main/resources/viafabricplus.mixins.json +++ b/src/main/resources/viafabricplus.mixins.json @@ -139,14 +139,11 @@ "fixes.viaversion.protocol1_9to1_8.MixinEntityTracker1_9", "fixes.viaversion.protocol1_9to1_8.MixinMetadataRewriter1_9To1_8", "fixes.viaversion.protocol1_9to1_8.MixinMovementTracker", - "fixes.viaversion.protocol1_9to1_8.MixinViaIdleThread" + "fixes.viaversion.protocol1_9to1_8.MixinViaIdleThread", + "base.MixinClientConnection_1", + "fixes.block.MixinAbstractBlock" ], "injectors": { "defaultRequire": 1 - }, - "mixins": [ - "base.MixinClientConnection_1", - "fixes.block.MixinAbstractBlock", - "fixes.vialegacy.MixinBedrockProtocol" - ] + } }