mcrating.org Сейчас на сайте: 2715 чел.
2715
Version Numbering Converter

Version Numbering Converter

Do you hate the new Apple-like version numbering system? Same! Do you like it? Don't care! Do you care about the version numbering and how to convert old versions to its new version or viceversa? This project is for you!

Плагины 340 загрузок 0 подписок

Описание

VNC (Version Numbering Converter)

Version Numbering Converter (VNC) is a Java 8 library for working with Minecraft versions across both numbering families:

  • Classic Java-style versions such as 1.20.6 and 1.21.11
  • Year-based drop versions such as 24.1, 25.4, and 26.1.1

The project is split so the common API can be used from any Java project without Bukkit on the classpath. Platform-specific runtime helpers live in separate modules and are selected through the bootstrap provider.

Modules

| Module | Artifact | Purpose | | --- | --- | --- | | bootstrap | me.croabeast.vnc:VNC | Final aggregate jar with VNC, core, and the provider implementations. | | core | me.croabeast.vnc:core | Common parser, provider contract, mapping tables, conversion schemes, protocol lookup, and generic runtime snapshots. | | bukkit | me.croabeast.vnc:bukkit | Internal Bukkit/Paper provider and ViaVersion-backed player protocol lookup. | | mod:fabric | me.croabeast.vnc:fabric | Fabric loader runtime version bridge. | | mod:quilt | me.croabeast.vnc:quilt | Quilt loader runtime version bridge. | | mod:forge | me.croabeast.vnc:forge | Forge runtime version bridge. | | mod:neoforge | me.croabeast.vnc:neoforge | NeoForge runtime version bridge compiled as Java 8 bytecode. | | mod:sponge | me.croabeast.vnc:sponge | Sponge runtime version bridge. | | mod:liteloader | me.croabeast.vnc:liteloader | Legacy LiteLoader bridge. | | proxy:bungee | me.croabeast.vnc:bungee | BungeeCord proxy version bridge. | | proxy:velocity | me.croabeast.vnc:velocity | Velocity proxy bridge for a supplied backend/support Minecraft version. |

Core API

MinecraftVersion classic = MinecraftVersion.parse("1.21.11");
MinecraftVersion drop = MinecraftVersion.parse("26.1");

classic.getVersion();         // "1.21.11"
classic.getProtocol();        // 774
classic.supportsHex();        // true

drop.getVersion();            // "26.1"
drop.getProtocol();           // 775
String dropName = VersionScheme.MOJANG.toDrop("1.20.3");       // "23.2"
String classicName = VersionScheme.MOJANG.toClassic("25.2.2"); // "1.21.8"

boolean modernRegistry = Versioning.isAtLeast(MinecraftVersion.parse("1.20.6"), "1.20.5");
int comparison = VNC.compare(MinecraftVersion.parse("26.1"), "1.21.11");

Platform Runtime API

Use bootstrap when you want VNC to detect the runtime provider:

VNCProvider provider = VNC.getProvider();

String platform = provider.getPlatform();
String classic = provider.getClassicVersion();
String drop = provider.getDropVersion();
int protocol = provider.getProtocol();
boolean modernRegistry = provider.isAtLeast("1.20.5");

VNC still exposes convenience methods for the detected provider:

MinecraftVersion server = VNC.SERVER_MINECRAFT_VERSION;
double legacy = VNC.SERVER_VERSION;
boolean modernRegistry = VNC.isAtLeast("1.20.5");

When the runtime may not have a supported provider, use the nullable accessor:

VNCProvider provider = VNC.getProviderOrNull();
if (provider != null && provider.isAtLeast("1.20.5")) {
    // use modern behavior
}

Platform modules contain package-private provider implementations. Consumers should depend on bootstrap for runtime detection instead of calling loader-specific classes directly.

Velocity does not expose one global backend Minecraft version. Its provider is still detected from the Velocity API, but version methods need a minecraft.version system property.

Requirements

  • Java 8 bytecode for every module
  • Gradle 9.4.1 wrapper for local builds
  • Optional platform APIs are compileOnly; platform modules use direct APIs and guard runtime detection with Throwable/linkage protection
  • The NeoForge module targets NeoForge 21.1.230, compiles Maven-style with source/target 1.8, and only resolves at runtime when Java 21+ and NeoForge are present

Build

./gradlew clean build

The final consumer jar is generated by the bootstrap module:

bootstrap/build/libs/VNC-${version}.jar

Maven repository publishing is handled only by .github/workflows/publish.yml.

Версии и скачивания

2 последних версий
1.2.0
84 загрузок · release · VNC-1.2.0.jar
bta-babric bukkit bungeecord fabric folia forge liteloader neoforge rd-132211 rd-132328 rd-20090515 rd-160052 rd-161348 c0.0.11a c0.0.13a_03 c0.0.13a c0.30_01c inf-20100618 a1.0.4 a1.0.5_01
Скачать
1.1.0
255 загрузок · release · VNC-1.1.0.jar
bukkit bungeecord fabric folia forge liteloader neoforge nilloader 1.0 1.1 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.1 1.3.2 1.4.2 1.4.4 1.4.5
Скачать

Категории

library management utility

Похожие ресурсы

ulib

ulib

1 258 загрузок