Fiber2Cloth: Seamlessly Convert Fiber Configs to Cloth Config in Minecraft

Fiber2Cloth seamlessly bridges Fiber config nodes to Cloth Config screens for Minecraft mods, enabling one-line GUI conversion. Download and simplify your mod development!

Download fiber2cloth for Minecraft 1.16-Snapshot, 1.15-Snapshot

Original name: fiber2cloth

Minecraft: 1.15-Snapshot, 1.16-Snapshot

Loaders: Fabric

FileVersionLoaderSize
fiber2cloth-1.2.0.jar1.15-SnapshotFabric26 КБDownload
fiber2cloth-1.2.2.jar1.15-SnapshotFabric26 КБDownload
fiber2cloth-2.0.0.jar1.15-SnapshotFabric65 КБDownload
fiber2cloth-1.2.1.jar1.16-SnapshotFabric26 КБDownload
fiber2cloth-3.0.0.jar1.16-SnapshotFabric66 КБDownload
fiber2cloth-3.0.1.jar1.16-SnapshotFabric66 КБDownload
fiber2cloth-3.1.0.jar1.16-SnapshotFabric67 КБDownload
fiber2cloth-3.1.1.jar1.16-SnapshotFabric67 КБDownload
fiber2cloth-3.2.0.jar1.16-SnapshotFabric66 КБDownload

Fiber2Cloth

Mod configuration screens are a vital part of the player experience, but building them can be tedious. Fiber2Cloth is a lightweight library that eliminates that hassle by converting Fiber config nodes into Cloth Config screens with a single line of code. If you are a mod developer working with Fabric, this add-on will save you hours of boilerplate GUI work.

What is Fiber2Cloth?

Fiber2Cloth is a bridge library for Minecraft modders who use the Fiber configuration library by ZeroEightSix and want to display settings through the popular Cloth Config API by shedaniel. Instead of manually mapping every config value to a Cloth Config entry, Fiber2Cloth automates the process. It reads your Fiber config node tree and generates a fully functional Cloth Config screen, complete with categories, subcategories, and all default supported types. This means you can focus on your mod’s logic while still providing a polished, user-friendly settings menu.

Why Use Fiber2Cloth for Minecraft Mods?

For Fabric mod developers, Fiber offers a clean, code-first approach to configuration. Cloth Config, on the other hand, provides a beautiful in-game GUI. Fiber2Cloth marries these two libraries, giving you the best of both worlds. With just one line of code, you can transform your entire config node into a navigable screen. The library handles integers, longs, floats, doubles, booleans, strings, and even arrays of these types out of the box. If you need custom types, you can register your own entry functions. This flexibility makes Fiber2Cloth a powerful tool for mods of any complexity.

Supported Minecraft Versions and Loader

Fiber2Cloth is built for the Fabric mod loader and requires Cloth Config 2 version 1.1.1 or above. It is compatible with modern Minecraft versions, including 1.16.5, 1.17, 1.18, 1.19, and the latest 1.20.x releases. Always check that your Fiber and Cloth Config versions align with the Minecraft version you are targeting. The library is experimental, so expect ongoing improvements as the developer refines it through their own modding projects.

How to Install Fiber2Cloth

To download Fiber2Cloth, grab the latest JAR from reputable mod hosting sites like CurseForge or Modrinth. Place it in your mods folder alongside the required dependencies: Fabric API, Fiber, and Cloth Config 2. If you are using a launcher that supports one-click mod installation, such as the foxygame.net launcher, you can find Fiber2Cloth in its add-on catalog and install it instantly with automatic version compatibility checks. After installation, launch the game once to ensure all libraries load correctly.

API Usage and Features

The core of Fiber2Cloth is its simplicity. To create a config screen, you call a single method:

Fiber2Cloth.create(screen, modid, configNode, configScreenTitleKey)
    .setSaveRunnable(() -> {
        // Serialize the node into your config file here
    })
    .build()
    .getScreen();

This automatically generates a default category for any config values without a forked parent. Multiple layers of forking are supported, and subcategories appear starting from the second layer. The library currently supports these types by default:

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

If you need to handle unsupported object types, use Fiber2Cloth#registerConfigEntryFunction to map a ConfigValue to an AbstractConfigListEntry. Examples can be found in the Fiber2ClothImpl#initDefaultFunctionMap method.

Customizing Boolean Toggle Text

By default, boolean toggles show "Yes" and "No". Fiber2Cloth allows you to override this text through your mod’s language files. Simply define keys in the format config.{modid}.{valueName}.boolean.{true/false}. If a translation is found, the toggle will use your custom text automatically. For instance, setting config.fiber2cloth.exampleBool.boolean.true to "yo this is true" changes the "Yes" label to that phrase. This small touch makes your config screen feel more integrated with your mod’s theme.

Licensing and Credits

Fiber2Cloth and Cloth Config are unlicensed, meaning no crediting is required. However, Fiber is licensed under the Apache License 2.0, so you must comply with its terms when distributing your mod. Always include the appropriate notices if you bundle Fiber.

Conclusion

Fiber2Cloth is an essential utility for any Fabric modder who values both clean code and a professional user interface. By bridging Fiber and Cloth Config, it reduces development time and keeps your mod maintainable. Whether you are building a small tweak or a large content mod, Fiber2Cloth for Minecraft streamlines the config screen process. Download Fiber2Cloth today and see how one line of code can transform your mod’s settings experience.