mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-15 10:45:35 +01:00
Updated Via*
This commit is contained in:
parent
679495bb0e
commit
28ce2ebc32
@ -70,7 +70,7 @@ It should work fine with most if not all mods and modpacks.
|
||||
- ***[Krypton](https://github.com/astei/krypton)***
|
||||
|
||||
## Supported Server versions
|
||||
- Release (1.0.0 - 1.20 [23w13a])
|
||||
- Release (1.0.0 - 1.20 [23w14a])
|
||||
- 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))
|
||||
|
@ -18,8 +18,8 @@ vialoadingbase_version=ae89fec4ab
|
||||
raknet_transport_version=1.0.0.CR1-SNAPSHOT
|
||||
|
||||
# viaversion (and required) libs
|
||||
viaversion_version=4.7.0-23w13a-SNAPSHOT
|
||||
viabackwards_version=4.7.0-23w13a-SNAPSHOT
|
||||
viaversion_version=4.7.0-23w14a-SNAPSHOT
|
||||
viabackwards_version=4.7.0-23w14a-SNAPSHOT
|
||||
snake_yml_version=2.0
|
||||
|
||||
# raphimc libs
|
||||
|
@ -44,7 +44,7 @@ public class MixinAddServerScreen extends Screen {
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
public void injectButton(CallbackInfo ci) {
|
||||
final ComparableProtocolVersion forcedVersion = ((IServerInfo) server).viafabricplus_forcedVersion();
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal(forcedVersion == null ? "Set version for this server" :forcedVersion.getName()), button ->
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal(forcedVersion == null ? "Set version for this server" : forcedVersion.getName()), button ->
|
||||
client.setScreen(new ForceVersionScreen(this, version -> ((IServerInfo) server).viafabricplus_forceVersion(version)))).
|
||||
position(width - (forcedVersion == null ? 150 : 98) - 5, 5).size(forcedVersion == null ? 150 : 98, 20).build());
|
||||
}
|
||||
|
@ -59,7 +59,11 @@ public class MixinServerInfo implements IServerInfo {
|
||||
@Inject(method = "fromNbt", at = @At("TAIL"), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private static void loadForcedVersion(NbtCompound root, CallbackInfoReturnable<ServerInfo> cir, ServerInfo serverInfo) {
|
||||
if (root.contains("viafabricplus_forcedversion")) {
|
||||
((IServerInfo) serverInfo).viafabricplus_forceVersion(ViaLoadingBase.fromProtocolId(root.getInt("viafabricplus_forcedversion")));
|
||||
try {
|
||||
((IServerInfo) serverInfo).viafabricplus_forceVersion(ViaLoadingBase.fromProtocolId(root.getInt("viafabricplus_forcedversion")));
|
||||
} catch (Exception ignored) {
|
||||
// Version doesn't exist anymore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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<>("23w13a", null));
|
||||
viafabricplus_remaps.put("1.20", new Pair<>("23w14a", null));
|
||||
}
|
||||
|
||||
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;register(ILjava/lang/String;)Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;"))
|
||||
|
Loading…
Reference in New Issue
Block a user