Radon
No reviews yet
A configuration library which is super easy to use
Provides a framework or library for other mods to use.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
Radon
This mod is a very easily usable configuration library.
Here's how to use it:
- Add the Modrinth Maven repository to your project:
repositories {
maven {
url = "https://api.modrinth.com/maven"
}
}
- Add Radon to the dependencies of your mod:
dependencies {
modImplementation "maven.modrinth:radon-lib:FIND_THE_LATEST_VERSION_ON_MODRINTH"
}
- Create a class which extends ConfigScreen:
package your.mod;
import me.kitty.radon.api.*;
public class MyConfig extends ConfigScreen {
@Override
public String getScreenTitle() {
return "your screen's title";
}
@Override
protected void radon() {
// you need tabs to create rows
Tab tab = tab("tab's name");
Tab otherTab = tab("second tab");
// you can also create sections
Section section = section(otherTab, "name");
// this is where we create our options
// if you want a boolean or an enum
// then you want to use ButtonRow
enum myEnum {
RADON,
CONFIG
}
ButtonRow buttonRow = buttonRow(
tab,
key("button_row"), // key of the row: Radon will save the content of the row to the disk with this key
"Label of the row",
List.of("Tooltip", "shows when you", "hover the row", "with your mouse"),
myEnum.RADON // either an option of your enum or true or false
);
// you sometimes want to run code, if the button's value is changed
// it's very simple to do that:
buttonRow.subscribe(newValue -> {
// newValue is an object
// but you can cast it into
(boolean) newValue
// or
(myEnum) newValue
// this will probably be made easier
});
// now, comes the slider row
// use this if you want a number
SliderRow sliderRow = sliderRow(
section, // here you can use a section instead of the tab
key("slider_key"),
"Label of the row",
List.of("Tooltip again"),
80, // initial value
50, // minimum value
100 // maximum value
);
// here subscribe gives you a long as newValue
// you can also run code, if Radon loaded the saved value of the option
sliderRow.onInit(() -> {
long value = sliderRow.getValue();
});
// and if you need a string value, use InputRow
InputRow inputRow = inputRow(
tab,
key("input"),
"Label of the row",
List.of("Tooltip"),
"Placeholder",
16 // limit how many characters it can be
);
// subscribe gives newValue as String here
}
}
- Add your class to
fabric.mod.jsonas an entrypoint:
{
"entrypoints": {
"radon": ["your.mod.MyConfig"]
}
}
It's that easy!
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers