diff --git a/gradle.properties b/gradle.properties index ad8533a3..54c799aa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ loader_version=0.14.19 fabric_api_version=0.79.1+1.20 # viafabricplus -mod_version=2.6.7 +mod_version=2.6.8 maven_group=de.florianmichael archives_base_name=viafabricplus @@ -24,13 +24,13 @@ viabackwards_version=4.7.0-23w17a-SNAPSHOT snake_yml_version=2.0 # raphimc libs -vialegacy_version=2.2.15 +vialegacy_version=2.2.16 viaaprilfools_version=2.0.6 viabedrock_version=0.0.1-SNAPSHOT minecraftauth_version=2.0.1 # lenni0451 libs -mcstructs_text_version=2.2.4 +mcstructs_text_version=2.2.5 reflect_version=1.1.0 # other libs diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinGameModeSelectionScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinGameModeSelectionScreen.java index c993f640..a314187e 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinGameModeSelectionScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinGameModeSelectionScreen.java @@ -27,6 +27,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -42,7 +43,8 @@ public class MixinGameModeSelectionScreen { @Inject(method = "", at = @At("RETURN")) public void fixUIWidth(CallbackInfo ci) { if (ProtocolHack.getTargetVersion().isOlderThan(ProtocolVersion.v1_8)) { - final List gameModeSelections = Arrays.stream(GameModeSelectionScreen.GameModeSelection.values()).toList(); + final List gameModeSelections = new ArrayList<>(Arrays.stream(GameModeSelectionScreen.GameModeSelection.values()).toList()); + if (ProtocolHack.getTargetVersion().isOlderThan(LegacyProtocolVersion.r1_3_1tor1_3_2)) gameModeSelections.remove(GameModeSelectionScreen.GameModeSelection.ADVENTURE); if (ProtocolHack.getTargetVersion().isOlderThan(ProtocolVersion.v1_8)) gameModeSelections.remove(GameModeSelectionScreen.GameModeSelection.SPECTATOR); 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 619fb760..3df80138 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 @@ -45,7 +45,7 @@ public abstract class MixinProtocolVersion { 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<>("23w16a", null)); + viafabricplus_remaps.put("1.20", new Pair<>("23w17a", 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;"))