diff --git a/README.md b/README.md
index d5b14f528..a6811927d 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
# Why another protocol translator?
ViaFabricPlus is intended to replace [multiconnect](https://github.com/Earthcomputer/multiconnect), and it also promises more compactness and stability. ViaFabricPlus can do everything multiconnect could do, but supports more Minecraft versions (listed below) and has more protocol changes implemented.
### Supported Server versions
-- Release (1.0.0 - 1.20 [1.20-rc1])
+- Release (1.0.0 - 1.20 [1.20])
- Beta (b1.0 - b1.8.1)
- Alpha (a1.0.15 - a1.2.6)
- Classic (c0.0.15 - c0.30 including [CPE](https://wiki.vg/Classic_Protocol_Extension))
diff --git a/gradle.properties b/gradle.properties
index f3427f1f7..98f844267 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -9,7 +9,7 @@ loader_version=0.14.21
fabric_api_version=0.83.0+1.20
# viafabricplus
-mod_version=2.7.5-SNAPSHOT
+mod_version=2.7.6-SNAPSHOT
maven_group=de.florianmichael
archives_base_name=viafabricplus
@@ -18,13 +18,13 @@ raknet_transport_version=1.0.0.CR1-SNAPSHOT
classic4j_version=1.2.0
# viaversion (and required) libs
-viaversion_version=4.7.0-1.20-rc1-SNAPSHOT
-viabackwards_version=4.7.0-1.20-pre5-SNAPSHOT
+viaversion_version=4.7.0
+viabackwards_version=4.7.0
snake_yml_version=2.0
# raphimc libs
vialegacy_version=2.2.17-SNAPSHOT
-viaaprilfools_version=2.0.7-SNAPSHOT
+viaaprilfools_version=2.0.8-SNAPSHOT
viabedrock_version=0.0.1-SNAPSHOT
minecraftauth_version=2.1.4-SNAPSHOT
vialoader_version=2.2.5-SNAPSHOT
diff --git a/src/main/java/de/florianmichael/viafabricplus/base/settings/groups/GeneralSettings.java b/src/main/java/de/florianmichael/viafabricplus/base/settings/groups/GeneralSettings.java
index 7bd39b858..c87f511e7 100644
--- a/src/main/java/de/florianmichael/viafabricplus/base/settings/groups/GeneralSettings.java
+++ b/src/main/java/de/florianmichael/viafabricplus/base/settings/groups/GeneralSettings.java
@@ -32,12 +32,12 @@ public class GeneralSettings extends SettingGroup {
Text.translatable("words.viafabricplus.rb")
);
public final BooleanSetting removeNotAvailableItemsFromCreativeTab = new BooleanSetting(this, Text.translatable("general.viafabricplus.creative"), true);
- public final BooleanSetting allowClassicProtocolCommandUsage = new BooleanSetting(this, Text.translatable("general.viafabricplus.classiccommands"), true);
public final BooleanSetting automaticallyChangeValuesBasedOnTheCurrentVersion = new BooleanSetting(this, Text.translatable("general.viafabricplus.protocolsync"), true);
public final BooleanSetting showSuperSecretSettings = new BooleanSetting(this, Text.translatable("general.viafabricplus.secret"), true);
public final BooleanSetting showExtraInformationInDebugHud = new BooleanSetting(this, Text.translatable("general.viafabricplus.extrainformation"), true);
public final BooleanSetting showClassicLoadingProgressInConnectScreen = new BooleanSetting(this, Text.translatable("general.viafabricplus.classicloading"), true);
public final BooleanSetting autoDetectVersion = new BooleanSetting(this, Text.translatable("general.viafabricplus.autodetect"), false);
+ public final BooleanSetting showAdvertisedServerVersion = new BooleanSetting(this, Text.translatable("general.viafabricplus.advertised"), true);
public GeneralSettings() {
super(Text.translatable("settings.viafabricplus.general"));
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/access/IServerInfo.java b/src/main/java/de/florianmichael/viafabricplus/injection/access/IServerInfo.java
index 1e67177db..99927adb4 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/access/IServerInfo.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/access/IServerInfo.java
@@ -23,4 +23,10 @@ public interface IServerInfo {
VersionEnum viafabricplus_forcedVersion();
void viafabricplus_forceVersion(VersionEnum version);
+
+ boolean viafabricplus_enabled();
+ void viafabricplus_enable();
+
+ int viafabricplus_translatingVersion();
+ void viafabricplus_setTranslatingVersion(final int version);
}
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinMultiplayerServerListPinger_1.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinMultiplayerServerListPinger_1.java
new file mode 100644
index 000000000..3bcfc8d7e
--- /dev/null
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinMultiplayerServerListPinger_1.java
@@ -0,0 +1,53 @@
+/*
+ * This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
+ * Copyright (C) 2021-2023 FlorianMichael/EnZaXD and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package de.florianmichael.viafabricplus.injection.mixin.base;
+
+import de.florianmichael.viafabricplus.injection.access.IServerInfo;
+import de.florianmichael.viafabricplus.protocolhack.ProtocolHack;
+import net.minecraft.client.network.ServerInfo;
+import net.minecraft.network.ClientConnection;
+import net.minecraft.network.listener.ClientQueryPacketListener;
+import net.minecraft.network.packet.s2c.query.QueryResponseS2CPacket;
+import org.spongepowered.asm.mixin.Final;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(targets = "net.minecraft.client.network.MultiplayerServerListPinger$1")
+public abstract class MixinMultiplayerServerListPinger_1 implements ClientQueryPacketListener {
+
+ @Final
+ @Shadow
+ ClientConnection field_3774;
+
+ @Final
+ @Shadow
+ ServerInfo field_3776;
+
+ @Inject(method = "onResponse(Lnet/minecraft/network/packet/s2c/query/QueryResponseS2CPacket;)V", at = @At("HEAD"))
+ public void trackTranslatingState(QueryResponseS2CPacket packet, CallbackInfo ci) {
+ if (field_3774.channel.hasAttr(ProtocolHack.LOCAL_VIA_CONNECTION)) {
+ ((IServerInfo) field_3776).viafabricplus_enable();
+
+ final var userConnection = field_3774.channel.attr(ProtocolHack.LOCAL_VIA_CONNECTION).get();
+ ((IServerInfo) field_3776).viafabricplus_setTranslatingVersion(userConnection.getProtocolInfo().getServerProtocolVersion());
+ }
+ }
+}
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinMultiplayerServerListWidget_ServerEntry.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinMultiplayerServerListWidget_ServerEntry.java
new file mode 100644
index 000000000..8a0c55be0
--- /dev/null
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinMultiplayerServerListWidget_ServerEntry.java
@@ -0,0 +1,55 @@
+/*
+ * This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
+ * Copyright (C) 2021-2023 FlorianMichael/EnZaXD and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package de.florianmichael.viafabricplus.injection.mixin.base;
+
+import de.florianmichael.viafabricplus.base.settings.groups.GeneralSettings;
+import de.florianmichael.viafabricplus.injection.access.IServerInfo;
+import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
+import net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget;
+import net.minecraft.client.network.ServerInfo;
+import net.minecraft.text.Text;
+import net.raphimc.vialoader.util.VersionEnum;
+import org.spongepowered.asm.mixin.Final;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Redirect;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Mixin(MultiplayerServerListWidget.ServerEntry.class)
+public class MixinMultiplayerServerListWidget_ServerEntry {
+
+ @Shadow @Final private ServerInfo server;
+
+ @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/multiplayer/MultiplayerScreen;setMultiplayerScreenTooltip(Ljava/util/List;)V", ordinal = 0))
+ public void showTranslatingInformation(MultiplayerScreen instance, List tooltip) {
+ final List tooltipOverwrite = new ArrayList<>(tooltip);
+ if (GeneralSettings.INSTANCE.showAdvertisedServerVersion.getValue()) {
+ final IServerInfo accessor = ((IServerInfo) server);
+ if (accessor.viafabricplus_enabled()) {
+ final var versionEnum = VersionEnum.fromProtocolId(accessor.viafabricplus_translatingVersion());
+
+ tooltipOverwrite.add(Text.translatable("words.viafabricplus.translate", versionEnum != VersionEnum.UNKNOWN ? versionEnum.getName() + " (" + versionEnum.getVersion() + ")" : accessor.viafabricplus_translatingVersion()));
+ tooltipOverwrite.add(Text.translatable("words.viafabricplus.serverversion", server.version.getString() + " (" + server.protocolVersion + ")"));
+ }
+ }
+ instance.setMultiplayerScreenTooltip(tooltipOverwrite);
+ }
+}
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinServerInfo.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinServerInfo.java
index ac4577569..089a8bb14 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinServerInfo.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinServerInfo.java
@@ -70,4 +70,30 @@ private static void loadForcedVersion(NbtCompound root, CallbackInfoReturnable viafabricplus_oldItems;
+ @Inject(method = "breakBlock", at = @At("TAIL"))
+ public void resetBlockBreaking(BlockPos pos, CallbackInfoReturnable cir) {
+ if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_14_3)) {
+ this.currentBreakingPos = new BlockPos(this.currentBreakingPos.getX(), -1, this.currentBreakingPos.getZ());
+ }
+ }
+
@Inject(method = "attackEntity", at = @At("HEAD"))
private void injectAttackEntity(PlayerEntity player, Entity target, CallbackInfo ci) {
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_8) && player instanceof IClientPlayerEntity) {
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java
index a80f7137b..7c0bca022 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java
@@ -27,7 +27,6 @@
import de.florianmichael.viafabricplus.protocolhack.ProtocolHack;
import de.florianmichael.viafabricplus.base.settings.groups.DebugSettings;
import net.raphimc.vialoader.util.VersionEnum;
-import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.ClientPlayerEntity;
@@ -76,6 +75,14 @@ private boolean preventGenericInteract(ActionResult instance) {
return instance.isAccepted();
}
+ @Redirect(method = "handleBlockBreaking", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;isUsingItem()Z"))
+ public boolean allowBlockBreakAndItemUsageAtTheSameTime(ClientPlayerEntity instance) {
+ if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_7_6tor1_7_10)) {
+ return false;
+ }
+ return instance.isUsingItem();
+ }
+
@Redirect(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/client/MinecraftClient;attackCooldown:I", ordinal = 1))
public int unwrapOperation(MinecraftClient instance) {
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_8)) {
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinClientPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinClientPlayerEntity.java
index 23f164d75..8973efe99 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinClientPlayerEntity.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinClientPlayerEntity.java
@@ -18,8 +18,8 @@
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.entity;
import com.mojang.authlib.GameProfile;
+import net.minecraft.world.GameMode;
import net.raphimc.vialoader.util.VersionEnum;
-import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.viafabricplus.base.settings.groups.DebugSettings;
import de.florianmichael.viafabricplus.definition.v1_8.ArmorPointCalculation;
import de.florianmichael.viafabricplus.injection.access.IClientPlayerEntity;
@@ -167,6 +167,14 @@ public void removeSprintingPacket(ClientPlayerEntity instance) {
}
}
+ @Redirect(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;isClimbing()Z"))
+ public boolean alwaysSendPacket(ClientPlayerEntity instance) {
+ if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_15_1)) {
+ return false;
+ }
+ return isClimbing();
+ }
+
@Redirect(method = "autoJump", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;inverseSqrt(F)F"))
public float useFastInverse(float x) {
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_19_3)) {
@@ -180,6 +188,14 @@ public float useFastInverse(float x) {
return MathHelper.inverseSqrt(x);
}
+ @Override
+ public boolean isCreative() {
+ if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_7_6tor1_7_10)) {
+ return client.interactionManager.getCurrentGameMode() == GameMode.CREATIVE;
+ }
+ return super.isCreative();
+ }
+
@Override
public int getArmor() {
if (VisualSettings.INSTANCE.emulateArmorHud.getValue()) {
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java
index c094f1864..37afaa0e4 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java
@@ -17,8 +17,8 @@
*/
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.entity;
+import net.minecraft.util.Hand;
import net.raphimc.vialoader.util.VersionEnum;
-import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.viafabricplus.base.settings.groups.VisualSettings;
import de.florianmichael.viafabricplus.protocolhack.ProtocolHack;
import net.minecraft.entity.EntityDimensions;
@@ -31,7 +31,6 @@
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
-import net.raphimc.viabedrock.api.BedrockProtocolVersion;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -115,6 +114,13 @@ private float modifySneakEyeHeight(float prevEyeHeight) {
}
}
+ @Redirect(method = "dropItem(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/ItemEntity;", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;swingHand(Lnet/minecraft/util/Hand;)V"))
+ public void dontSwingHand(PlayerEntity instance, Hand hand) {
+ if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_15_2)) return;
+
+ instance.swingHand(hand);
+ }
+
@Unique
public boolean viafabricplus_isSprinting;
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java
index 546743401..38d4c3b34 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java
@@ -46,7 +46,6 @@ private static void initMaps(CallbackInfo ci) {
viafabricplus_remaps.put("1.16.4/5", new Pair<>("1.16.4-1.16.5", null));
viafabricplus_remaps.put("1.18/1.18.1", new Pair<>("1.18-1.18.1", null));
viafabricplus_remaps.put("1.19.1/2", new Pair<>("1.19.1-1.19.2", null));
- viafabricplus_remaps.put("1.20", new Pair<>("1.20-rc1", null));
}
@Redirect(method = "", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;register(ILjava/lang/String;)Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;"))
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_15to1_14_4/MixinMetadataRewriter1_15To1_14_4.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_15to1_14_4/MixinMetadataRewriter1_15To1_14_4.java
index 7c5eff86e..59d11ed1f 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_15to1_14_4/MixinMetadataRewriter1_15To1_14_4.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_15to1_14_4/MixinMetadataRewriter1_15To1_14_4.java
@@ -21,7 +21,7 @@
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
-import com.viaversion.viaversion.protocols.protocol1_14to1_13_2.ClientboundPackets1_14;
+import com.viaversion.viaversion.protocols.protocol1_14_4to1_14_3.ClientboundPackets1_14_4;
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.Protocol1_15To1_14_4;
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.metadata.MetadataRewriter1_15To1_14_4;
import com.viaversion.viaversion.rewriter.EntityRewriter;
@@ -35,7 +35,7 @@
@SuppressWarnings("DataFlowIssue")
@Mixin(MetadataRewriter1_15To1_14_4.class)
-public abstract class MixinMetadataRewriter1_15To1_14_4 extends EntityRewriter {
+public abstract class MixinMetadataRewriter1_15To1_14_4 extends EntityRewriter {
public MixinMetadataRewriter1_15To1_14_4(Protocol1_15To1_14_4 protocol) {
super(protocol);
diff --git a/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java b/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java
index 8010c5682..69034678c 100644
--- a/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java
+++ b/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java
@@ -33,7 +33,7 @@ public class PackFormatsMappings {
private final static Map protocolMap = new HashMap<>();
public static void load() {
- registerVersion(VersionEnum.r1_20, 15, "1.20 Release Candidate 1", "1.20-rc1");
+ registerVersion(VersionEnum.r1_20, 15, "1.20");
registerVersion(VersionEnum.r1_19_4, 13, "1.19.4");
registerVersion(VersionEnum.r1_19_3, 12, "1.19.3");
registerVersion(VersionEnum.r1_19_1tor1_19_2, 9, "1.19.2");
diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusBaseVersionProvider.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusBaseVersionProvider.java
index 13faadae6..6c2eea64d 100644
--- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusBaseVersionProvider.java
+++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusBaseVersionProvider.java
@@ -53,7 +53,7 @@ public class ViaFabricPlusBaseVersionProvider extends BaseVersionProvider {
// Based on https://github.com/ViaVersion/ViaFabric/blob/main/viafabric-mc119/src/main/java/com/viaversion/fabric/mc119/service/ProtocolAutoDetector.java
private final static LoadingCache> AUTO_DETECTION_CACHE = CacheBuilder.newBuilder().
- expireAfterWrite(30, TimeUnit.SECONDS).
+ expireAfterWrite(10, TimeUnit.MINUTES).
build(CacheLoader.from(address -> {
CompletableFuture future = new CompletableFuture<>();
diff --git a/src/main/resources/assets/viafabricplus/lang/cs_cz.json b/src/main/resources/assets/viafabricplus/lang/cs_cz.json
index c3eb29d3d..58786489d 100644
--- a/src/main/resources/assets/viafabricplus/lang/cs_cz.json
+++ b/src/main/resources/assets/viafabricplus/lang/cs_cz.json
@@ -18,7 +18,6 @@
"general.viafabricplus.classicloading": "Zobrazit progres načítání mapy při připojování ke classic serveru",
"general.viafabricplus.main": "Umístění hlavního tlačítka",
"general.viafabricplus.creative": "Odstranit nedostupné předměty z inventáře tvořivé hry",
- "general.viafabricplus.classiccommands": "Povolit classic příkazy",
"general.viafabricplus.protocolsync": "Automaticky změnit nastavení podle zvolené verze",
"experimental.viafabricplus.chunkborderfix": "Opravit okraje chunků",
diff --git a/src/main/resources/assets/viafabricplus/lang/de_de.json b/src/main/resources/assets/viafabricplus/lang/de_de.json
index 288f38729..4fd79dbe3 100644
--- a/src/main/resources/assets/viafabricplus/lang/de_de.json
+++ b/src/main/resources/assets/viafabricplus/lang/de_de.json
@@ -14,7 +14,6 @@
"general.viafabricplus.classicloading": "Lade-Fortschritt in der Classic anzeigen",
"general.viafabricplus.main": "Position des Haupt-Buttons",
"general.viafabricplus.creative": "Nicht verfügbare Items von Kreativ-Tab entfernen",
- "general.viafabricplus.classiccommands": "Classic Protocol Command-Nutzung erlauben",
"general.viafabricplus.protocolsync": "Einstellungen automatisch an die aktuelle Version anpassen",
"debug.viafabricplus.sequence": "Sequencing deaktivieren",
diff --git a/src/main/resources/assets/viafabricplus/lang/en_us.json b/src/main/resources/assets/viafabricplus/lang/en_us.json
index 54f28abd6..805ef3864 100644
--- a/src/main/resources/assets/viafabricplus/lang/en_us.json
+++ b/src/main/resources/assets/viafabricplus/lang/en_us.json
@@ -13,6 +13,8 @@
"words.viafabricplus.reset": "Reset",
"words.viafabricplus.copy": "Copy code",
"words.viafabricplus.error": "Something went wrong! Please try again later",
+ "words.viafabricplus.translate": "Via translates to: %s",
+ "words.viafabricplus.serverversion": "Server version: %s",
"settings.viafabricplus.authentication": "Authentication",
"settings.viafabricplus.experimental": "Experimental",
@@ -25,9 +27,9 @@
"general.viafabricplus.classicloading": "Show classic loading progress in connect screen",
"general.viafabricplus.main": "Main button orientation",
"general.viafabricplus.creative": "Remove not available items from creative tab",
- "general.viafabricplus.classiccommands": "Allow classic protocol command usage",
"general.viafabricplus.protocolsync": "Automatically change Settings based on the current version",
"general.viafabricplus.autodetect": "Auto detect version",
+ "general.viafabricplus.advertised": "Show advertised/server version in Multiplayer",
"experimental.viafabricplus.chunkborderfix": "Fix Chunk borders",
"experimental.viafabricplus.watermovement": "Water movement edge detection",
diff --git a/src/main/resources/assets/viafabricplus/lang/fi_fi.json b/src/main/resources/assets/viafabricplus/lang/fi_fi.json
index 66263c18b..98bcff2b2 100644
--- a/src/main/resources/assets/viafabricplus/lang/fi_fi.json
+++ b/src/main/resources/assets/viafabricplus/lang/fi_fi.json
@@ -19,7 +19,6 @@
"general.viafabricplus.classicloading": "Näytä klassinen latauksen tila Yhdistetään -näytössä",
"general.viafabricplus.main": "Pää-napin suunta",
"general.viafabricplus.creative": "Poista saavuttamattomat esineet Luova-välilehdestä",
- "general.viafabricplus.classiccommands": "Salli klassisen protokollan komentojen käyttö",
"general.viafabricplus.protocolsync": "Automaattisesti vaihda asetuksia version mukaan",
"general.viafabricplus.autodetect": "Havaitse versio automaattisesti",
diff --git a/src/main/resources/assets/viafabricplus/lang/fr_fr.json b/src/main/resources/assets/viafabricplus/lang/fr_fr.json
index a4740b5af..04a290f66 100644
--- a/src/main/resources/assets/viafabricplus/lang/fr_fr.json
+++ b/src/main/resources/assets/viafabricplus/lang/fr_fr.json
@@ -18,7 +18,6 @@
"general.viafabricplus.classicloading": "Afficher la progression du chargement classique dans l'écran de connexion",
"general.viafabricplus.main": "Orientation du bouton principal",
"general.viafabricplus.creative": "Supprimer les éléments non disponibles de l'inventaire créatif",
- "general.viafabricplus.classiccommands": "Autoriser l'utilisation de la commande de protocole classique",
"general.viafabricplus.protocolsync": "Modifier automatiquement les paramètres en fonction de la version utilisée",
"general.viafabricplus.autodetect": "Détecter automatiquement la version",
diff --git a/src/main/resources/assets/viafabricplus/lang/hu_hu.json b/src/main/resources/assets/viafabricplus/lang/hu_hu.json
index 960443b5e..0d562501e 100644
--- a/src/main/resources/assets/viafabricplus/lang/hu_hu.json
+++ b/src/main/resources/assets/viafabricplus/lang/hu_hu.json
@@ -18,7 +18,6 @@
"general.viafabricplus.classicloading": "Klasszikus folyamatjelző mutatása a csatlakozási képernyőn",
"general.viafabricplus.main": "Fő gomb elhelyezése",
"general.viafabricplus.creative": "Nem elérhető tárgyak eltávolítása a kreatív felszerelésből",
- "general.viafabricplus.classiccommands": "Klasszikus protokoll parancsok használatának engedélyezése",
"general.viafabricplus.protocolsync": "A Beállítások automatikus módosítása a jelenlegi verzió alapján",
"general.viafabricplus.autodetect": "Automatikus verziófelismerés",
diff --git a/src/main/resources/assets/viafabricplus/lang/ja_jp.json b/src/main/resources/assets/viafabricplus/lang/ja_jp.json
index a3df1ca00..f0ab994d5 100644
--- a/src/main/resources/assets/viafabricplus/lang/ja_jp.json
+++ b/src/main/resources/assets/viafabricplus/lang/ja_jp.json
@@ -17,7 +17,6 @@
"general.viafabricplus.classicloading": "接続画面に昔の読み込み進行情報を表示",
"general.viafabricplus.main": "メインボタンの位置",
"general.viafabricplus.creative": "利用不可能なアイテムをクリエイティブタブから削除",
- "general.viafabricplus.classiccommands": "従来のプロトコルコマンドの使用を許可",
"general.viafabricplus.protocolsync": "選択中のバージョンに基づいて設定を自動的に変更",
"debug.viafabricplus.sequence": "優先順位付けを無効化",
diff --git a/src/main/resources/assets/viafabricplus/lang/lb_lu.json b/src/main/resources/assets/viafabricplus/lang/lb_lu.json
index 8a1e2b2b8..6b3662b47 100644
--- a/src/main/resources/assets/viafabricplus/lang/lb_lu.json
+++ b/src/main/resources/assets/viafabricplus/lang/lb_lu.json
@@ -14,7 +14,6 @@
"general.viafabricplus.classicloading": "Lued-Fortschrett an der Classic Unweisen",
"general.viafabricplus.main": "Positioun vun den Haupt-Buttons",
"general.viafabricplus.creative": "Net verfügbar Items vum Kreativ-Tab entfernen",
- "general.viafabricplus.classiccommands": "Classic Protocol Comman-Notzung erlaben",
"general.viafabricplus.protocolsync": "Astellungen automatisch Un die aktuell Versioun Upassen",
"debug.viafabricplus.sequence": "Sequencing deaktiveieren",
diff --git a/src/main/resources/assets/viafabricplus/lang/pl_pl.json b/src/main/resources/assets/viafabricplus/lang/pl_pl.json
index cd86db02a..a8f51cdca 100644
--- a/src/main/resources/assets/viafabricplus/lang/pl_pl.json
+++ b/src/main/resources/assets/viafabricplus/lang/pl_pl.json
@@ -13,6 +13,8 @@
"words.viafabricplus.reset": "Resetuj",
"words.viafabricplus.copy": "Kopiuj kod",
"words.viafabricplus.error": "Coś poszło nie tak! Proszę, spróbuj ponownie później",
+ "words.viafabricplus.translate": "Via tłumaczy na: %s",
+ "words.viafabricplus.serverversion": "Wersja serwera: %s",
"settings.viafabricplus.authentication": "Uwierzytelnianie",
"settings.viafabricplus.experimental": "Eksperymenty",
@@ -25,9 +27,9 @@
"general.viafabricplus.classicloading": "Pokazuj klasyczny pasek ładowania w ekranie łączenia",
"general.viafabricplus.main": "Lokalizacja głównego przycisku",
"general.viafabricplus.creative": "Usuwaj niedostępne przedmioty z ekwipunku trybu kreatywnego",
- "general.viafabricplus.classiccommands": "Zezwalaj na używanie klasycznego protokołu komend",
"general.viafabricplus.protocolsync": "Automatycznie zmieniaj ustawienia na podstawie obecnej wersji gry",
"general.viafabricplus.autodetect": "Automatycznie wykrywaj wersję gry",
+ "general.viafabricplus.advertised": "Pokazuj informacje dotyczące tłumaczenia pakietów po najechaniu na ikonę pingu w menu multiplayer",
"experimental.viafabricplus.chunkborderfix": "Napraw granice chunków",
"experimental.viafabricplus.watermovement": "Wykrywanie krawędzi ruchu wody",
diff --git a/src/main/resources/assets/viafabricplus/lang/ru_ru.json b/src/main/resources/assets/viafabricplus/lang/ru_ru.json
index d0692c09a..783c29425 100644
--- a/src/main/resources/assets/viafabricplus/lang/ru_ru.json
+++ b/src/main/resources/assets/viafabricplus/lang/ru_ru.json
@@ -25,7 +25,6 @@
"general.viafabricplus.classicloading": "Экран загрузки Classic при подключении",
"general.viafabricplus.main": "Позиция кнопки",
"general.viafabricplus.creative": "Удалить недоступные предметы из творческого инвентаря",
- "general.viafabricplus.classiccommands": "Разрешить использование протокола команд Classic",
"general.viafabricplus.protocolsync": "Автоматически подстраивать настройки к текущей версии",
"general.viafabricplus.autodetect": "Определять версию автоматически",
diff --git a/src/main/resources/assets/viafabricplus/lang/th_th.json b/src/main/resources/assets/viafabricplus/lang/th_th.json
index 195ddb495..a7fe9503f 100644
--- a/src/main/resources/assets/viafabricplus/lang/th_th.json
+++ b/src/main/resources/assets/viafabricplus/lang/th_th.json
@@ -14,7 +14,6 @@
"general.viafabricplus.classicloading": "แสดงหน้าโหลดคลาสสิค",
"general.viafabricplus.main": "การวางแนวปุ่มหลัก",
"general.viafabricplus.creative": "ลบไอเท็มที่ไม่มีใน creative tab",
- "general.viafabricplus.classiccommands": "อนุญาติคำสั่งแบบคลาสสิค",
"general.viafabricplus.protocolsync": "เปลี่ยนการตั้งค่าโดยอัตโนมัติตามเวอร์ชันปัจจุบัน",
"debug.viafabricplus.sequence": "ปิดใช้งานการจัดลำดับ",
diff --git a/src/main/resources/assets/viafabricplus/lang/uk_ua.json b/src/main/resources/assets/viafabricplus/lang/uk_ua.json
index b30cdbf8e..1120acdb8 100644
--- a/src/main/resources/assets/viafabricplus/lang/uk_ua.json
+++ b/src/main/resources/assets/viafabricplus/lang/uk_ua.json
@@ -13,6 +13,7 @@
"words.viafabricplus.reset": "Зкинути",
"words.viafabricplus.copy": "Зкопіювати код",
"words.viafabricplus.error": "Щось пішло не так! Спробуйте будь ласка пізніше",
+ "words.viafabricplus.translate": "Via переклади до: %s",
"settings.viafabricplus.authentication": "Авторизація",
"settings.viafabricplus.experimental": "Експериментальне",
@@ -25,9 +26,9 @@
"general.viafabricplus.classicloading": "Показувати класичний прогрес завантаження на екрані підключення",
"general.viafabricplus.main": "Орієнтація головної кнопки",
"general.viafabricplus.creative": "Видалити недоступні предмети з меню креативу",
- "general.viafabricplus.classiccommands": "Дозволити використання команд класичного протоколу",
"general.viafabricplus.protocolsync": "Автоматично змінювати налаштування для вибраної версії",
"general.viafabricplus.autodetect": "Автоматично відсліджувати версію",
+ "general.viafabricplus.advertised": "Показувати рекламовану/серверну версію в багатокористувацькій грі",
"experimental.viafabricplus.chunkborderfix": "Полагодити границі чанків",
"experimental.viafabricplus.watermovement": "Виявлення краю руху води",
diff --git a/src/main/resources/assets/viafabricplus/lang/zh_cn.json b/src/main/resources/assets/viafabricplus/lang/zh_cn.json
index eb8bd68f7..36bd20c82 100644
--- a/src/main/resources/assets/viafabricplus/lang/zh_cn.json
+++ b/src/main/resources/assets/viafabricplus/lang/zh_cn.json
@@ -18,7 +18,6 @@
"general.viafabricplus.classicloading": "在连接服务器时使用旧版加载进度条",
"general.viafabricplus.main": "模组按钮位置",
"general.viafabricplus.creative": "从创造模式选项中移除不可用的物品",
- "general.viafabricplus.classiccommands": "允许使用旧版命令协议",
"general.viafabricplus.protocolsync": "自动根据所选版本调整设置",
"general.viafabricplus.autodetect": "自动检测版本",
diff --git a/src/main/resources/assets/viafabricplus/lang/zh_tw.json b/src/main/resources/assets/viafabricplus/lang/zh_tw.json
index b70bed5bb..4a782dcbd 100644
--- a/src/main/resources/assets/viafabricplus/lang/zh_tw.json
+++ b/src/main/resources/assets/viafabricplus/lang/zh_tw.json
@@ -18,7 +18,6 @@
"general.viafabricplus.classicloading": "在連接伺服器時使用舊版進度顯示",
"general.viafabricplus.main": "模組按鈕位置",
"general.viafabricplus.creative": "從創造模式物品欄內移除不可用的物品",
- "general.viafabricplus.classiccommands": "允許使用舊版指令協議",
"general.viafabricplus.protocolsync": "自動根據所選版本調整設定",
"general.viafabricplus.autodetect": "自動偵測版本",
diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json
index 7e8eacb25..4df477075 100644
--- a/src/main/resources/viafabricplus.mixins.json
+++ b/src/main/resources/viafabricplus.mixins.json
@@ -16,6 +16,8 @@
"base.MixinMinecraftClient",
"base.MixinMultiplayerScreen",
"base.MixinMultiplayerServerListPinger",
+ "base.MixinMultiplayerServerListPinger_1",
+ "base.MixinMultiplayerServerListWidget_ServerEntry",
"base.MixinOptionsScreen",
"base.MixinServerInfo",
"base.MixinSharedConstants",