▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Version Numbering Converter
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!

Оцените первым
574
1

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

ModuleArtifactPurpose
bootstrapme.croabeast.vnc:VNCFinal aggregate jar with VNC, core, and the provider implementations.
coreme.croabeast.vnc:coreCommon parser, provider contract, mapping tables, conversion schemes, protocol lookup, and generic runtime snapshots.
bukkitme.croabeast.vnc:bukkitInternal Bukkit/Paper provider and ViaVersion-backed player protocol lookup.
mod:fabricme.croabeast.vnc:fabricFabric loader runtime version bridge.
mod:quiltme.croabeast.vnc:quiltQuilt loader runtime version bridge.
mod:forgeme.croabeast.vnc:forgeForge runtime version bridge.
mod:neoforgeme.croabeast.vnc:neoforgeNeoForge runtime version bridge compiled as Java 8 bytecode.
mod:spongeme.croabeast.vnc:spongeSponge runtime version bridge.
mod:liteloaderme.croabeast.vnc:liteloaderLegacy LiteLoader bridge.
proxy:bungeeme.croabeast.vnc:bungeeBungeeCord proxy version bridge.
proxy:velocityme.croabeast.vnc:velocityVelocity 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.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

rd-2009051526.2.x26.1.x1.21.x1.20.x1.19.x1.18.x1.17.x1.16.x1.15.x1.14.x1.13.x1.12.x1.11.x1.10.x1.9.x1.8.x1.7.x1.6.x1.5.x1.4.x1.3.x1.2.x1.1.x1.0.x

Поддерживаемые окружения

Клиент и сервер

Ссылки


Создатели

Детали

Лицензия:
Опубликован:6 месяцев назад
Обновлён:3 недели назад
Главная