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.
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.
评论 0
登录后参与评分
还没有评论,来抢沙发吧