diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinProtocolVersion.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinProtocolVersion.java index 64df05da0..49b6611b9 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinProtocolVersion.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinProtocolVersion.java @@ -47,14 +47,13 @@ public abstract class MixinProtocolVersion { private static void initMaps(CallbackInfo ci) { viaFabricPlus$skips = ImmutableSet.of("1.4.6/7", "1.5.1", "1.5.2", "1.6.1", "1.6.2", "1.6.3", "1.6.4"); viaFabricPlus$remaps = new HashMap<>(); - viaFabricPlus$remaps.put("1.7-1.7.5", new Pair<>("1.7.2-1.7.5", new VersionRange("1.7", 2, 5))); viaFabricPlus$remaps.put("1.9.3/4", new Pair<>("1.9.3-1.9.4", null)); viaFabricPlus$remaps.put("1.11.1/2", new Pair<>("1.11.1-1.11.2", null)); 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/1.20.1", new Pair<>("1.20-1.20.1", null)); - viaFabricPlus$remaps.put("1.20.3", new Pair<>("1.20.3-1.20.4", null)); + viaFabricPlus$remaps.put("1.20.3", new Pair<>("1.20.3-1.20.4", new VersionRange("1.20", 3, 4))); } @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;")) @@ -63,6 +62,9 @@ private static ProtocolVersion unregisterAndRenameVersions(int version, String n final Pair remapEntry = viaFabricPlus$remaps.get(name); if (remapEntry != null) { if (remapEntry.key() != null) name = remapEntry.key(); + if (remapEntry.value() != null) { + return ProtocolVersion.register(version, name, remapEntry.value()); + } } return ProtocolVersion.register(version, name); @@ -75,6 +77,9 @@ private static ProtocolVersion unregisterAndRenameVersions(int version, int snap final Pair remapEntry = viaFabricPlus$remaps.get(name); if (remapEntry != null) { if (remapEntry.key() != null) name = remapEntry.key(); + if (remapEntry.value() != null) { + return ProtocolVersion.register(version, snapshotVersion, name, remapEntry.value()); + } } return ProtocolVersion.register(version, snapshotVersion, name);