Language

Radon

Radon

Modrinth

A configuration library which is super easy to use

1.3k downloads updated 3mo ago
latest v1.0.0-beta.7+1.21.11 Modrinth
Fabric 1.21 – 1.21.11 Library

Radon

time
Time

Downloads

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.json as an entrypoint:
{
  "entrypoints": {
    "radon": ["your.mod.MyConfig"]
  }
}

It's that easy!

Versions

Beta
1.0.0-beta.7+1.21.11
fabric · 1.21.11 · 3mo ago
551
Beta
1.0.0-beta.7+1.21.10
fabric · 1.21.9, 1.21.10 · 3mo ago
57
Beta
1.0.0-beta.7+1.21.8
fabric · 1.21.6, 1.21.7, 1.21.8 · 3mo ago
66
Beta
1.0.0-beta.7+1.21.5
fabric · 1.21.5 · 3mo ago
20
Beta
1.0.0-beta.7+1.21.4
fabric · 1.21.2, 1.21.3, 1.21.4 · 3mo ago
97
Beta
1.0.0-beta.7+1.21.1
fabric · 1.21, 1.21.1 · 3mo ago
145
Beta
1.0.0-beta.6+1.21.11
fabric · 1.21.11 · 3mo ago
11
Beta
1.0.0-beta.6+1.21.10
fabric · 1.21.9, 1.21.10 · 3mo ago
4
Beta
1.0.0-beta.6+1.21.8
fabric · 1.21.6, 1.21.7, 1.21.8 · 3mo ago
6
Beta
1.0.0-beta.6+1.21.5
fabric · 1.21.5 · 3mo ago
8
Beta
1.0.0-beta.6+1.21.4
fabric · 1.21.2, 1.21.3, 1.21.4 · 3mo ago
7
Beta
1.0.0-beta.6+1.21.1
fabric · 1.21, 1.21.1 · 3mo ago
8

Comments 0

No comments yet. Be the first to share your thoughts.

Download Radon

B 1.0.0-beta.7+1.21.11 1.21.11 fabric 104 KB B 1.0.0-beta.7+1.21.10 1.21.9, 1.21.10 fabric 105 KB B 1.0.0-beta.7+1.21.8 1.21.6, 1.21.7, 1.21.8 fabric 104 KB B 1.0.0-beta.7+1.21.5 1.21.5 fabric 104 KB B 1.0.0-beta.7+1.21.4 1.21.2, 1.21.3, 1.21.4 fabric 104 KB B 1.0.0-beta.7+1.21.1 1.21, 1.21.1 fabric 104 KB B 1.0.0-beta.6+1.21.11 1.21.11 fabric 104 KB B 1.0.0-beta.6+1.21.10 1.21.9, 1.21.10 fabric 104 KB B 1.0.0-beta.6+1.21.8 1.21.6, 1.21.7, 1.21.8 fabric 104 KB B 1.0.0-beta.6+1.21.5 1.21.5 fabric 104 KB B 1.0.0-beta.6+1.21.4 1.21.2, 1.21.3, 1.21.4 fabric 104 KB B 1.0.0-beta.6+1.21.1 1.21, 1.21.1 fabric 104 KB B 1.0.0-beta.5+1.21.11 1.21.11 fabric 104 KB B 1.0.0-beta.5+1.21.10 1.21.9, 1.21.10 fabric 104 KB B 1.0.0-beta.5+1.21.8 1.21.6, 1.21.7, 1.21.8 fabric 104 KB B 1.0.0-beta.5+1.21.5 1.21.5 fabric 104 KB B 1.0.0-beta.5+1.21.4 1.21.2, 1.21.3, 1.21.4 fabric 104 KB B 1.0.0-beta.5+1.21.1 1.21, 1.21.1 fabric 104 KB B 1.0.0-beta.4+1.21.11 1.21.11 fabric 104 KB B 1.0.0-beta.4+1.21.10 1.21.9, 1.21.10 fabric 104 KB B 1.0.0-beta.4+1.21.8 1.21.6, 1.21.7, 1.21.8 fabric 104 KB B 1.0.0-beta.4+1.21.5 1.21.5 fabric 104 KB B 1.0.0-beta.4+1.21.4 1.21.2, 1.21.3, 1.21.4 fabric 104 KB B 1.0.0-beta.4+1.21.1 1.21, 1.21.1 fabric 103 KB B 1.0.0-beta.3+1.21.11 1.21.11 fabric 101 KB B 1.0.0-beta.3+1.21.10 1.21.9, 1.21.10 fabric 101 KB B 1.0.0-beta.3+1.21.8 1.21.6, 1.21.7, 1.21.8 fabric 101 KB B 1.0.0-beta.3+1.21.5 1.21.5 fabric 101 KB B 1.0.0-beta.3+1.21.4 1.21.2, 1.21.3, 1.21.4 fabric 101 KB B 1.0.0-beta.3+1.21.1 1.21, 1.21.1 fabric 100 KB B 1.0.0-beta.2 1.21.11 fabric 101 KB B 1.0.0-beta.2 1.21.9, 1.21.10 fabric 101 KB B 1.0.0-beta.2 1.21.6, 1.21.7, 1.21.8 fabric 100 KB B 1.0.0-beta.2 1.21.5 fabric 101 KB B 1.0.0-beta.2 1.21.2, 1.21.3, 1.21.4 fabric 100 KB B 1.0.0-beta.2 1.21, 1.21.1 fabric 100 KB B 1.0.0-beta.1 1.21.11 fabric 105 KB B 1.0.0-beta.1 1.21.9, 1.21.10 fabric 105 KB B 1.0.0-beta.1 1.21.6, 1.21.7, 1.21.8 fabric 105 KB B 1.0.0-beta.1 1.21.5 fabric 105 KB B 1.0.0-beta.1 1.21.2, 1.21.3, 1.21.4 fabric 105 KB B 1.0.0-beta.1 1.21, 1.21.1 fabric 105 KB A 1.0.0-alpha.1 1.21.11 fabric 1.1 MB A 1.0.0-alpha.1 1.21.9, 1.21.10 fabric 1.1 MB A 1.0.0-alpha.1 1.21.6, 1.21.7, 1.21.8 fabric 1.1 MB A 1.0.0-alpha.1 1.21.5 fabric 1.1 MB A 1.0.0-alpha.1 1.21.2, 1.21.3, 1.21.4 fabric 1.1 MB A 1.0.0-alpha.1 1.21, 1.21.1 fabric 1.1 MB

Files are served directly from the original source. Modgrid does not host or modify them.