Simple FabricMC access widener file parser for the JVM
Kotlin 60.9%
Shell 29.4%
Batchfile 9.7%
1 1 1

Clone this repository

https://tangled.org/lillianro.se/lilykt-accesswidener-parser
git@tangled.org:lillianro.se/lilykt-accesswidener-parser

For self-hosted knots, clone URLs may differ based on your setup.

README.md

lilykt-accesswidener-parser#

Simple FabricMC access widener file parser for the JVM.

Usage#

This project is published to the maven central repository, so you most likely can add the dependency without added setup.

You can check the latest version on maven central or by looking at git tags.

implementation("se.lillianro:lilykt-accesswidener-parser:LATEST_VERSION")

Kotlin Example#

import lillianrose.accesswidener.format

fun main() {
    val file = File("...")
    val widener = AccessWidenerParser.parse(file.readText())
    widener.classes.forEach {
        println(it)
    }
}

Java Example#

import java.nio.file.Files;
import java.nio.file.Paths;
import java.io.IOException;
import lillianrose.accesswidener.format.AccessWidenerParser;

void main() {
    var path = Paths.get("...");
    try {
        var file = Files.readString(path);
        var widener = AccessWidenerParser.parse(file);
        widener.classes().forEach(System.out::println);
    } catch (IOException e) {
        e.printStackTrace();
    }
}