-
-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
Configuring with JSON is very easy, and can be used for modpack creators etc.
Create the file .minecraft/config/isxander-main-menu-credits.json
and copy this (or let it generate it for you on first launch)
{
"main_menu": {
"top_left": [
],
"top_right": [
],
"bottom_left": [
],
"bottom_right": [
],
"mod_blacklist": [
]
},
"pause_menu": {
"top_left": [
],
"top_right": [
],
"bottom_left": [
],
"bottom_right": [
],
"mod_blacklist": [
]
}
}
Now, inside the arrays you can add comma seperated text objects, just like the ones
used in the /tellraw
in-game command.
You can find more information on creating these text objects on the minecraft wiki.
Additionally, you can blacklist certain mods from using the runtime API if they are annoying or unwanted.
There is also an API for adding entries at runtime (which won't be added to JSON)
In fabric.mod.json
or quilt.mod.json
add a new entrypoint under the key of main-menu-credits
pointing to your class implementing MainMenuCreditsAPI
{
"entrypoints": {
"main-menu-credits": [
"path.to.class.implementing.MainMenuCreditsAPI"
]
}
}
within your class, you can return a list of Text
objects that will be displayed AFTER ones found in JSON.
public class MyMainMenuCredits implements MainMenuCreditsAPI {
@Override
public List<Text> getTitleScreenTopLeft() {
return Lists.newArrayList(new LiteralText("Hello!"));
}
}