Mineuniverse
Mods
Fiber2Cloth

Fiber2Cloth

MOD
A simple API to magically make fiber config nodes into cloth
by shedaniel
Download Claim this project
3,923 downloads
0 likes
Updated Oct 14, 2026
0 hypes
Map and Information
Advertisement Remove ads with Premium →

 

A simple library that converts Fiber’s Config Node to Cloth Config Screen in 1 line.

Requires Cloth Config 2 v1.1.1 or above

NOTE: This is still an experimental library, and there aren’t a lot of features. I am using this library on my own mods and I will see how this goes.

 


 


Licensing

Fiber2Cloth and ClothConfig are unlicensed, no crediting is required. Fiber is licensed under Apache License 2.0. Make sure that you properly comply with their license.

 

Maven

Latest Version of Fiber2Cloth: image

Latest Version of ClothConfig 2: image

Latest Version of Fiber: Click Me

dependencies {
modApi ("me.shedaniel.cloth:config-2:ABC") {
transitive = false
}
modApi ("me.shedaniel.cloth:fiber2cloth:ABC") {
transitive = false
}
modApi "me.zeroeightsix:fiber:ABC"
include "me.shedaniel.cloth:config-2:ABC"
include "me.shedaniel.cloth:fiber2cloth:ABC"
include "me.zeroeightsix:fiber:ABC"
}

 



 

Default Supported Types

  • Integer
  • Long
  • Float
  • Double
  • Boolean
  • String
  • Integer[]
  • Long[]
  • Float[]
  • Double[]
  • String[]

 

 

API Usage

This is the one line that will convert your config node into a cloth config screen.

Fiber2Cloth.create(screen, modid, configNode, configScreenTitleKey).setSaveRunnable(() -> {

    // Here you should serialise the node into the config file.

}).build().getScreen();

A default category will be created (the name is customisable) if there is a config value without a forked parent.

Multiple layers of forking are allowed, and subcategories will be used starting from the second layer.

 

Using Unsupported Types

If you have an object type outside the default supported types, you can use Fiber2Cloth#registerConfigEntryFunction, it takes the class of the object type and a function that turns ConfigValue into AbstractConfigListEntry

You can see examples in Fiber2ClothImpl#initDefaultFunctionMap

Changing the default Yes / No text for boolean toggles

Declare the yes / no text in lang files with key config.{modid}.{valueName}.boolean.{true/false}, and if the key is found translated, it will automatically switch to using that instead of the default.

Example

Fiber2Cloth's example lang has config.fiber2cloth.exampleBool.boolean.true set to yo this is true, which means that config.fiber2cloth.exampleBool's Yes text is changed to yo this is true automatically.

[Fabric 1.16.5] v3.2.0
MC 1.16-Snapshot, 1.17.1, 1.16.3, 1.16.1, 1.18.1, 1.17, 1.16, Fabric, 1.19-Snapshot, 1.16.5, 1.18.2, 1.17-Snapshot, 1.18, 1.16.4, 1.18-Snapshot, 1.16.2
Release 2021-06-14 Get
[Fabric 1.16-pre3] v3.1.1
MC 1.16-Snapshot, Fabric
Release 2021-02-01 Get
[Fabric 1.16.x] v3.1.0
MC 1.16-Snapshot, 1.16.3, 1.16.1, 1.16, Fabric, 1.16.5, 1.16.4, 1.16.2
Release 2020-12-26 Get
[Fabric 1.16.x] v3.0.1
MC 1.16-Snapshot, 1.16.3, 1.16.1, 1.16, Fabric, 1.16.4, 1.16.2
Release 2020-06-17 Get
[Fabric 1.16-pre3] v3.0.0
MC 1.16-Snapshot, Fabric
Release 2020-06-11 Get
[Fabric 1.15.x] v2.0.0
MC 1.15-Snapshot, 1.15, Fabric, 1.15.2, 1.15.1
Release 2020-06-01 Get
[Fabric 1.15.x] v1.2.2
MC 1.15-Snapshot, 1.15, Fabric, 1.15.2, 1.15.1
Release 2020-05-04 Get
[Fabric] v1.2.1
MC 1.16-Snapshot, 1.15-Snapshot, 1.14.4, 1.14.1, 1.14.3, 1.15, Fabric, 1.15.2, 1.14, 1.14.2, 1.14-Snapshot, 1.15.1
Release 2019-11-02 Get
[Fabric] v1.2.0
MC 1.15-Snapshot, 1.14.4, 1.14.1, 1.14.3, Fabric, 1.14, 1.14.2, 1.14-Snapshot
Release 2019-09-08 Get

More from shedaniel

Advertisement Remove ads with Premium →

You Might Also Like