Update Via* libraries and fixup build files (#93)

* Some small improvements

* Update Via*, Fix things

Fix incompatibility with Patcher
Fix jar manifest attribute caused not detected in mod list

* Update build.gradle

* Update src/main/java/de/florianmichael/viaforge/mixin/impl/fixes/patcher/MixinProtocolVersionDetector.java

Co-authored-by: EnZaXD <florian.michael07@gmail.com>

* Update src/main/java/de/florianmichael/viaforge/mixin/impl/fixes/patcher/MixinProtocolVersionDetector.java

* Update src/main/java/de/florianmichael/viaforge/mixin/impl/fixes/patcher/MixinProtocolVersionDetector.java

* Update src/main/java/de/florianmichael/viaforge/mixin/impl/fixes/patcher/MixinProtocolVersionDetector.java

* Update src/main/java/de/florianmichael/viaforge/mixin/impl/fixes/patcher/MixinProtocolVersionDetector.java

---------

Co-authored-by: EnZaXD <florian.michael07@gmail.com>
This commit is contained in:
Howard ZHY 2024-06-11 21:29:03 +08:00 committed by GitHub
parent e46d3df947
commit c93999b9ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 51 additions and 8 deletions

View File

@ -96,9 +96,10 @@ mixin {
jar {
manifest.attributes(
"MixinConfigs": "mixins.${maven_name}.json",
"tweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"TweakOrder": 0,
"FMLCorePluginContainsFMLMod": "de.florianmichael.viaforge.mixin.MixinLoader"
"FMLCorePlugin": "de.florianmichael.viaforge.mixin.MixinLoader",
"FMLCorePluginContainsFMLMod": "true"
)
enabled = false

View File

@ -4,13 +4,13 @@ org.gradle.daemon=false
# Project Details
maven_name=viaforge-mc189
maven_version=3.6.2-SNAPSHOT
maven_version=3.6.2
maven_group=de.florianmichael
# ViaVersion
viaversion_version=4.10.1
viabackwards_version=4.10.1
viarewind_version=3.1.1
viaversion_version=4.10.3-SNAPSHOT
viabackwards_version=4.10.3-SNAPSHOT
viarewind_version=3.1.2
vialegacy_version=2.2.23-SNAPSHOT
viaaprilfools_version=2.0.13-SNAPSHOT
vialoader_version=2.2.14-SNAPSHOT

View File

@ -0,0 +1,41 @@
/*
* This file is part of ViaForge - https://github.com/FlorianMichael/ViaForge
* Copyright (C) 2021-2024 FlorianMichael/EnZaXD <florian.michael07@gmail.com> 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 <http://www.gnu.org/licenses/>.
*/
package de.florianmichael.viaforge.mixin.impl.fixes.patcher;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.viaforge.common.ViaForgeCommon;
import org.spongepowered.asm.mixin.Dynamic;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Pseudo
@Mixin(targets = "club.sk1er.patcher.util.status.ProtocolVersionDetector", remap = false)
public abstract class MixinProtocolVersionDetector {
@SuppressWarnings("rawtypes, unchecked")
@Dynamic
@Inject(method = "isCompatibleWithVersion", at = @At("HEAD"), cancellable = true)
private void viaforge$setCompatible(String ip, int version, CallbackInfoReturnable cir) {
cir.setReturnValue(ViaForgeCommon.getManager().getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_11));
}
}

View File

@ -10,13 +10,14 @@
"MixinGuiOverlayDebug",
"MixinGuiScreenAddServer",
"MixinGuiScreenServerList",
"MixinServerData",
"connect.MixinGuiConnecting_1",
"connect.MixinNetHandlerLoginClient",
"connect.MixinNetworkManager",
"connect.MixinNetworkManager_5",
"MixinServerData",
"connect.MixinServerPinger",
"fixes.MixinEntityPlayerSP",
"connect.MixinGuiConnecting_1"
"fixes.patcher.MixinProtocolVersionDetector"
],
"verbose": true
}