From e7bc91b5976abb651783bb7afabeb0015f2ee4c3 Mon Sep 17 00:00:00 2001 From: SashegDev Date: Sat, 17 Oct 2026 02:54:23 +0300 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFrsxm-lib=200.1.0:=20=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D1=81=D0=B8=D1=8F=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82?= =?UTF-8?q?=D0=B5=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Мод печатает Rsxm.describe() при старте, и несовпадение версий видно сразу, а не превращается в NoSuchMethodError посреди сессии. --- src/main/java/net/rsxm/lib/Rsxm.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/net/rsxm/lib/Rsxm.java diff --git a/src/main/java/net/rsxm/lib/Rsxm.java b/src/main/java/net/rsxm/lib/Rsxm.java new file mode 100644 index 0000000..336ca8a --- /dev/null +++ b/src/main/java/net/rsxm/lib/Rsxm.java @@ -0,0 +1,24 @@ +package net.rsxm.lib; + +/** + * What this library is and which version of it a mod was built against. + * + * A mod prints this in its log on startup, so a mismatch between the library a + * mod was compiled against and the one sitting in libs\ is visible immediately + * instead of turning into a NoSuchMethodError in the middle of a session. + */ +public final class Rsxm { + + /** Bump when the public surface changes in a way that breaks compilation. */ + public static final String VERSION = "0.1.0"; + + /** Where mods are expected to find this library. */ + public static final String LIB_DIR = "libs"; + + private Rsxm() { + } + + public static String describe() { + return "rsxm-lib " + VERSION; + } +}