-
Notifications
You must be signed in to change notification settings - Fork 4
version warning
BlueLib provides a built-in system to display a version warning screen when your mod is running an unstable, alpha, or snapshot version. This helps inform players that they may encounter bugs or instability in the current build.
This system is customizable and localized through your mod’s language files.
To enable the version warning, you need to implement the BuildDetails interface from the software.bluelib package.
Create a class that implements:
software.bluelib.BuildDetailsYour implementation should return your mod's version, build status, and other details BlueLib uses to determine if a warning should be shown.
Create a service loader file in the following location:
resources/META-INF/services/software.bluelib.BuildDetails
Inside this file, put the fully qualified class name of your BuildDetails implementation. For example:
com.example.mymod.MyModBuildDetails
This tells BlueLib which class provides the build information at runtime.
You can override the default text shown in the version warning by providing the following language keys in your mod’s .lang or .json language file:
yourmodid.version.warning.title=This is a snapshot!
yourmodid.version.warning.description=You are running a development version which may be unstable.
yourmodid.version.warning.dont_show_again=Don't show again
yourmodid.version.warning.dont_show_again_tip=Disables this warning for future launches.
| Key | Description |
|---|---|
yourmodid.version.warning.title |
The title of the warning screen |
yourmodid.version.warning.description |
Message explaining that the version is unstable |
yourmodid.version.warning.dont_show_again |
Label for the "Don't show again" checkbox |
yourmodid.version.warning.dont_show_again_tip |
Tooltip shown when hovering over the checkbox |
If these keys are not provided, BlueLib will fall back to default messages defined in the library’s internal language file.
- Displays a warning screen for snapshot/alpha builds
- Logic is defined by implementing
BuildDetails - Uses Java Service Loader system for registration
- Fully localizable using standard language keys
- Defaults to BlueLib language if no override is found
For help with implementation, reach out in the official Discord community.
Variant Loader
Data Pipeline
Network & Packets
Logging
Markdown
Utility Classes
- Conversion
- Math
- Minecraft
- Schedular