Mod

Lexiconfig

Quick rating

Lexiconfig

No reviews yet

This is a config API that aims to provide many integrations alongside other libraries, and to be as easy as possible to use, for both developers and users alike.

No Theme
No Genre
Mod Loaders
Forge
NeoForge
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Required

About

Project Details

Type
Mod
License
GNU General Public License v3.0 only
Latest Version
[NEOFORGE] Lexiconfig 1.4.21-novel
Authors
CurseForge
Modrinth

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.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Overview

This is a config API meant to provide compatibility across multiple different other config libraries as well as be easy to use in a multiloader project setup, mainly for use in my mods.

It features a simple to use annotation-based syntax, to make creating new configuration files as easy as possible.

If you are a mod user, this information is likely not very useful to you. If you are a mod developer however, and you would like to use Lexiconfig in your own projects, scroll further to the Development section.

It currently does not have support for other configuration libraries, but as I continue to update it, I will add more compatibilities to each one to ensure that it does not conflict with others and can instead seamlessly integrate between them.

Here is a list of current as well as planned integrations across different config libraries/api:

❌ - Unintegrated ✅ - Integrated ❓ - In Progress

Status Mod
Cloth Config
oωo config
Configured
Forge Config Screens

Development

This mod contains an api that can be used to shelve new lexicons, listen to events, etc.

Depending

build.gradle

dependencies {
  implementation "com.codinglitch.lexiconfig:lexiconfig-api:API_VERSION_HERE"
}

You can go to https://versions.codinglitch.com to view the latest api version.

Usage

To shelve your own lexicons, you first have to your own Library. This can be done by simply creating a new class extending the Library class, and annotating it with the LexiconLibrary annotation.

@LexiconLibrary
public class MyNewLibrary extends Library {
  @Override
  public void shelveLexicons() {

  }
}

In a Forge setup, no further changes need to be made. However, if you are developing for Fabric, you will have to add this class as an entrypoint in your fabric.mod.json.

fabric.mod.json

//...
"entrypoints": {
  "lexiconfig": [
    "com.path.to.MyNewLibrary"
  ]
}
//...

The next step is to finally create and shelve your lexicons. You can do this by simply creating another class for the lexicon, and providing it with the proper annotations, like as follows:

@Lexicon(name = MY_LEXICON_TITLE) // preferably use your mod id as a name
public class MyLexicon extends LexiconData {
  @LexiconEntry(comment = "This is a comment for a simple field!")
  public String mySimpleField = "content";

  @LexiconPage(comment = "This is a fancy new comment on the fancy new category!")
  public MyNewPage myNewPage = new MyNewPage();

  public static class MyNewPage extends LexiconPageData {
    @LexiconEntry(comment = "This field is inside a lexicon page!")
    public Boolean myPageField = true;
  }
}

The next and last step is to shelve the lexicon, which can be done by simply adding an instance of it as a field in the library and shelving it in the given method.

@LexiconLibrary
public class MyNewLibrary extends Library {
  public static MyLexicon MY_LEXICON = new MyLexicon();

  @Override
  public void shelveLexicons() {
    LexiconfigApi.shelveLexicon(MY_LEXICON);
  }
}

Overview

This is a config API meant to provide compatibility across multiple different other config libraries as well as be easy to use in a multiloader project setup, mainly for use in my mods.

It features a simple to use annotation-based syntax, to make creating new configuration files as easy as possible.

If you are a mod user, this information is likely not very useful to you. If you are a mod developer however, and you would like to use Lexiconfig in your own projects, scroll further to the Development section.

It currently does not have support for other configuration libraries, but as I continue to update it, I will add more compatibilities to each one to ensure that it does not conflict with others and can instead seamlessly integrate between them.

Here is a list of current as well as planned integrations across different config libraries/api:

❌ - Unintegrated ✅ - Integrated ❓ - In Progress

Status Mod
Cloth Config
oωo config
Configured
Forge Config Screens

Development

This mod contains an api that can be used to shelve new lexicons, listen to events, etc.

Depending

build.gradle

repositories {
  maven { url 'https://maven.codinglitch.com/repository/releases' }
}

dependencies {
  implementation "com.codinglitch.lexiconfig:lexiconfig-api:API_VERSION_HERE"
}

You can go to https://versions.codinglitch.com to view the latest api version.

Usage

To shelve your own lexicons, you first have to your own Library. This can be done by simply creating a new class extending the Library class, and annotating it with the LexiconLibrary annotation.

@LexiconLibrary
public class MyNewLibrary extends Library {
  @Override
  public void shelveLexicons() {
      
  }
}

In a Forge setup, no further changes need to be made. However, if you are developing for Fabric, you will have to add this class as an entrypoint in your fabric.mod.json.

fabric.mod.json

//...
"entrypoints": {
  "lexiconfig": [
    "com.path.to.MyNewLibrary"
  ]
}
//...

The next step is to finally create and shelve your lexicons. You can do this by simply creating another class for the lexicon, and providing it with the proper annotations, like as follows:

@Lexicon(name = MY_LEXICON_TITLE) // preferably use your mod id as a name
public class MyLexicon extends LexiconData {
  @LexiconEntry(comment = "This is a comment for a simple field!")
  public String mySimpleField = "content";

  @LexiconPage(comment = "This is a fancy new comment on the fancy new category!")
  public MyNewPage myNewPage = new MyNewPage();

  public static class MyNewPage extends LexiconPageData {
    @LexiconEntry(comment = "This field is inside a lexicon page!")
    public Boolean myPageField = true;
  }
}

The next and last step is to shelve the lexicon, which can be done by simply adding an instance of it as a field in the library and shelving it in the given method.

@LexiconLibrary
public class MyNewLibrary extends Library {
  public static MyLexicon MY_LEXICON = new MyLexicon();
  
  @Override
  public void shelveLexicons() {
    LexiconfigApi.shelveLexicon(MY_LEXICON);
  }
}

Screenshots

Gallery

This project has no gallery images yet.

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

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

7.9m
Total Downloads
CurseForge
6.5m
Modrinth
1.4m
Last Updated
CurseForge
Modrinth
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync