From 08056c3ee88718e0d2f3b2f74efa17fa799837e4 Mon Sep 17 00:00:00 2001
From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com>
Date: Wed, 22 Mar 2023 15:00:00 +0100
Subject: [PATCH] moved USAGE to own file
---
.github/USAGE.md | 25 ++++++++++++++++
README.md | 30 ++-----------------
...eplacement.java => TileServerAddress.java} | 2 +-
.../screen/MixinMultiplayerScreen.java | 4 +--
.../MixinMultiplayerServerListPinger.java | 4 +--
5 files changed, 32 insertions(+), 33 deletions(-)
create mode 100644 .github/USAGE.md
rename src/main/java/de/florianmichael/viafabricplus/definition/{ServerAddressReplacement.java => TileServerAddress.java} (97%)
diff --git a/.github/USAGE.md b/.github/USAGE.md
new file mode 100644
index 00000000..0d951044
--- /dev/null
+++ b/.github/USAGE.md
@@ -0,0 +1,25 @@
+## Settings and GUI
+In the multiplayer screen you will find the ViaFabricPlus button in the upper left corner by default, it is the main button,
+click on it, and you will see the Protocol selection, there you can choose the Minecraft version you want to connect to,
+in the upper left corner you can go to the Settings.
+
+![](images/multiplayer.png)
+![](images/protocol.png)
+
+In the Add/Edit Server screen there is a button where you can select a specific version for this server, when you ping or connect to this server,
+ViaFabricPlus will use the version set there, the versions are stored in the servers.dat too
+
+![](images/force.png)
+
+If you don't want to specify a specific version anymore, you can simply press the button and select **"Cancel and reset"**.
+
+### Settings are optional settings that can turn fixes on and off, originally they were used for debugging
+![](images/settings.png)
+
+## Bedrock edition
+Keep in mind that the Java -> Bedrock support is still in beta phase, and therefore many things are not implemented
+yet and there is no guarantee that everything will work as it should.
+![](images/bedrock.png)
+
+To log in to a Bedrock account you can press the button **"Click to set account for Bedrock edition"** in the settings,
+then you can log in via device login, the account logged in there will be stored in **~/ViaFabricPlus/bedrock.account**.
diff --git a/README.md b/README.md
index 43535886..7a55d546 100644
--- a/README.md
+++ b/README.md
@@ -54,8 +54,8 @@ ViaFabricPlus uses Gradle, to make sure that it is installed properly you can ch
## To learn more about the API and about addons, you can simply click [here](.github/DEVELOPER_API.md)
# For users
-If you encounter any issues, please report them on the
-[issue tracker](https://github.com/FlorianMichael/ViaFabricPlus/issues).
+## To learn more about how to use this mod, you can simply click [here](.github/USAGE.md)
+### If you encounter any issues, please report them on the [issue tracker](https://github.com/FlorianMichael/ViaFabricPlus/issues).
## Compatibility
ViaFabricPlus is structured to interfere with mods as little as possible.
@@ -104,32 +104,6 @@ However, if a version between two Minecraft versions is too unstable, I will def
they do not have their own releases, current backports (named after their branch):
- [1.19.3](https://modrinth.com/mod/viafabricplus/version/0.0.0)
-## Settings and GUI
-In the multiplayer screen you will find the ViaFabricPlus button in the upper left corner by default, it is the main button,
-click on it, and you will see the Protocol selection, there you can choose the Minecraft version you want to connect to,
-in the upper left corner you can go to the Settings.
-
-![](/.github/images/multiplayer.png)
-![](/.github/images/protocol.png)
-
-In the Add/Edit Server screen there is a button where you can select a specific version for this server, when you ping or connect to this server,
-ViaFabricPlus will use the version set there, the versions are stored in the servers.dat too
-
-![](/.github/images/force.png)
-
-If you don't want to specify a specific version anymore, you can simply press the button and select **"Cancel and reset"**.
-
-### Settings are optional settings that can turn fixes on and off, originally they were used for debugging
-![](/.github/images/settings.png)
-
-## Bedrock edition
-Keep in mind that the Java -> Bedrock support is still in beta phase, and therefore many things are not implemented
-yet and there is no guarantee that everything will work as it should.
-![](/.github/images/bedrock.png)
-
-To log in to a Bedrock account you can press the button **"Click to set account for Bedrock edition"** in the settings,
-then you can log in via device login, the account logged in there will be stored in **~/ViaFabricPlus/bedrock.account**.
-
## Classic stuff
### Custom protocol extensions
ViaFabricPlus implements new Classic Extensions into the CPE protocol of ViaLegacy which are rather client side.
diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/ServerAddressReplacement.java b/src/main/java/de/florianmichael/viafabricplus/definition/TileServerAddress.java
similarity index 97%
rename from src/main/java/de/florianmichael/viafabricplus/definition/ServerAddressReplacement.java
rename to src/main/java/de/florianmichael/viafabricplus/definition/TileServerAddress.java
index 5eb4cbd3..fd0689ae 100644
--- a/src/main/java/de/florianmichael/viafabricplus/definition/ServerAddressReplacement.java
+++ b/src/main/java/de/florianmichael/viafabricplus/definition/TileServerAddress.java
@@ -25,7 +25,7 @@ import net.minecraft.client.network.ServerAddress;
import net.raphimc.viabedrock.api.BedrockProtocolVersion;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
-public class ServerAddressReplacement {
+public class TileServerAddress {
private final static ProtocolRange SRV_RANGE = new ProtocolRange(ProtocolVersion.v1_16_4, LegacyProtocolVersion.r1_3_1tor1_3_2);
public static ServerAddress parse(final ComparableProtocolVersion version, String address) {
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerScreen.java
index 7a6bdaa8..745b543b 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerScreen.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerScreen.java
@@ -17,7 +17,7 @@
*/
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.screen;
-import de.florianmichael.viafabricplus.definition.ServerAddressReplacement;
+import de.florianmichael.viafabricplus.definition.TileServerAddress;
import de.florianmichael.viafabricplus.injection.access.IServerInfo;
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
import net.minecraft.client.network.ServerAddress;
@@ -42,6 +42,6 @@ public class MixinMultiplayerScreen {
@Redirect(method = "connect(Lnet/minecraft/client/network/ServerInfo;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ServerAddress;parse(Ljava/lang/String;)Lnet/minecraft/client/network/ServerAddress;"))
public ServerAddress doOwnParse(String address) {
- return ServerAddressReplacement.parse(((IServerInfo) viafabricplus_lastConnect).viafabricplus_forcedVersion(), address);
+ return TileServerAddress.parse(((IServerInfo) viafabricplus_lastConnect).viafabricplus_forcedVersion(), address);
}
}
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerServerListPinger.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerServerListPinger.java
index 47d141ae..122ca137 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerServerListPinger.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMultiplayerServerListPinger.java
@@ -17,7 +17,7 @@
*/
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.screen;
-import de.florianmichael.viafabricplus.definition.ServerAddressReplacement;
+import de.florianmichael.viafabricplus.definition.TileServerAddress;
import de.florianmichael.viafabricplus.injection.access.IServerInfo;
import net.minecraft.client.network.MultiplayerServerListPinger;
import net.minecraft.client.network.ServerAddress;
@@ -42,6 +42,6 @@ public class MixinMultiplayerServerListPinger {
@Redirect(method = "add", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ServerAddress;parse(Ljava/lang/String;)Lnet/minecraft/client/network/ServerAddress;"))
public ServerAddress doOwnParse(String address) {
- return ServerAddressReplacement.parse(((IServerInfo) viafabricplus_lastConnect).viafabricplus_forcedVersion(), address);
+ return TileServerAddress.parse(((IServerInfo) viafabricplus_lastConnect).viafabricplus_forcedVersion(), address);
}
}