Bump version

This commit is contained in:
FlorianMichael 2023-03-21 20:36:18 +01:00
parent d1ce29e76a
commit f4ce31638f
3 changed files with 3 additions and 8 deletions

View File

@ -9,7 +9,7 @@ loader_version=0.14.17
fabric_api_version=0.76.0+1.19.4
# viafabricplus
mod_version=2.2.1
mod_version=2.3.1
maven_group=de.florianmichael
archives_base_name=viafabricplus

View File

@ -44,8 +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());
}

View File

@ -70,7 +70,6 @@ public class MixinConnectScreen_1 {
public String replaceAddress(InetSocketAddress instance) {
if (ProtocolHack.isOlderThanOrEqualToOrForced(instance, ProtocolVersion.v1_17) || ProtocolHack.isEqualToOrForced(instance, BedrockProtocolVersion.bedrockLatest))
return field_33737.getAddress();
return instance.getHostString();
}
@ -78,7 +77,6 @@ public class MixinConnectScreen_1 {
public int replacePort(InetSocketAddress instance) {
if (ProtocolHack.isOlderThanOrEqualToOrForced(instance, ProtocolVersion.v1_17) || ProtocolHack.isEqualToOrForced(instance, BedrockProtocolVersion.bedrockLatest))
return field_33737.getPort();
return instance.getPort();
}
@ -86,9 +84,7 @@ public class MixinConnectScreen_1 {
public Object mapSocketAddress(Optional<InetSocketAddress> instance) {
final InetSocketAddress address = instance.get();
final ComparableProtocolVersion forcedVersion = ((IServerInfo) field_40415).viafabricplus_forcedVersion();
if (forcedVersion != null) {
ProtocolHack.getForcedVersions().put(address, forcedVersion);
}
if (forcedVersion != null) ProtocolHack.getForcedVersions().put(address, forcedVersion);
return address;
}