Promote ViaFabric for older game versions

This commit is contained in:
FlorianMichael 2024-07-27 18:44:53 +02:00
parent b85431c437
commit 19b96029c4
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
2 changed files with 1 additions and 17 deletions

View File

@ -19,6 +19,7 @@ At the time of writing, ViaFabricPlus is the only mod that supports joining all
legacy combat mechanics, movement, and rendering changes to make the gameplay more feel like the old days.
**On the other hand, ViaFabricPlus supports only the latest Minecraft client version, and only Fabric.**
If you need ViaFabricPlus for older versions of the game, you can use [ViaFabric](https://viaversion.com/fabric)
## Supported Server versions
- Release (1.0.0 - 1.21)

View File

@ -293,23 +293,6 @@ public class ProtocolTranslator {
}
}
/**
* Returns true if first is closer to version than second
*
* @param version The version to compare to
* @param first The first version
* @param second The second version
* @return true if first is closer to version than second
*/
public static boolean isCloserTo(final ProtocolVersion version, final ProtocolVersion first, final ProtocolVersion second) {
if (version.getVersionType() == first.getVersionType() || version.getVersionType() == second.getVersionType()) {
return Math.abs(version.getVersion() - first.getVersion()) < Math.abs(version.getVersion() - second.getVersion());
} else {
final int ordinal = version.getVersionType().ordinal();
return Math.abs(ordinal - first.getVersionType().ordinal()) < Math.abs(ordinal - second.getVersionType().ordinal());
}
}
/**
* This method is used to initialize the whole Protocol Translator
*