Skip to content

How to integrate Tablesaw into your mod

woodiertexas edited this page Mar 24, 2023 · 4 revisions

With JSON

In src/main/resources/data/<modid>/custom_recipes/tablesaw, add the following for registering a 1:1 recipe.

{
    "input": "minecraft:oak_planks",
    "result": "minecraft:oak_button"
}

or, add the following for registering a recipe that takes more than one item and outputs more than one item.

{
    "input": {
        "item": "minecraft:oak_planks",
        "count": 3
    },
    "result": {
        "item": "minecraft:oak_stairs",
        "count": 2
    }
}

With Gradle

Tablesaw uses the Modrinth Maven, so if you are not sure on how to use the maven, read here.

In build.gradle add:

dependencies {
    // Your other dependencies for your project

    modImplementation "maven.modrinth:arch-ex:<versionID>"
}

Note: You can get version IDs here.

In quilt.mod.json, add

"entrypoints": {
    "init": "com.example.<modID>.ExampleMod",
    "tablesaw": "com.example.<modID>.TableSawImplementation"
}

In src/main/java/com/example/<modID>/, add a java file named TableSawImplementationand populate it with the following:

public class TableSawImplementation implements TableSawCompat {
    @Override
    public void run(TableSawAPI api) {
        // This is how you'd add Tablesaw recipes.
        api.registerTableSawRecipe(item, itemCount, itemStack);
        // This is helpful for ensuring your recipes are actually loaded.
        LOGGER.info("Someone ate a debuggy block today");
    }
}
Clone this wiki locally